diff --git a/.vortex/docs/content/development/composer.mdx b/.vortex/docs/content/development/composer.mdx index 201c255208..0edaae6e46 100644 --- a/.vortex/docs/content/development/composer.mdx +++ b/.vortex/docs/content/development/composer.mdx @@ -554,6 +554,7 @@ where each module is installed. | [`drupal/devel`](https://www.drupal.org/project/devel) | A suite of development tools for inspecting variables, entities and the service container while debugging. | [Settings](settings.mdx#per-module-overrides) | | [`drupal/drupal_helpers`](https://www.drupal.org/project/drupal_helpers) | A collection of helper functions that simplify writing update hooks and deployment operations. | [Drupal helpers](modules/drupal-helpers.mdx) | | [`drupal/environment_indicator`](https://www.drupal.org/project/environment_indicator) | Shows a colored banner identifying the current environment to prevent accidental changes on the wrong site. | [Settings](settings.mdx#per-module-overrides) | +| [`drupal/fast_404`](https://www.drupal.org/project/fast_404) | Answers requests for missing files with a 404 before Drupal bootstraps, saving the bootstrap that core's own fast 404 still performs. | [Settings](settings.mdx#per-module-overrides) | | [`drupal/generated_content`](https://www.drupal.org/project/generated_content) | Generates deterministic placeholder content from declarative definitions for development and testing. | [Generated content](modules/generated-content.mdx), [Settings](settings.mdx#per-module-overrides) | | [`drupal/migrate_plus`](https://www.drupal.org/project/migrate_plus) | Extends the core Migrate API with extra source and process plugins and configuration-entity migrations. | [Migrations](migrations.mdx) | | [`drupal/migrate_tools`](https://www.drupal.org/project/migrate_tools) | Provides Drush commands and a UI to run, roll back and monitor migrations. | [Migrations](migrations.mdx) | diff --git a/.vortex/docs/content/development/modules/contributed-modules.mdx b/.vortex/docs/content/development/modules/contributed-modules.mdx index ad7f8a5a61..6c1b1a46bf 100644 --- a/.vortex/docs/content/development/modules/contributed-modules.mdx +++ b/.vortex/docs/content/development/modules/contributed-modules.mdx @@ -77,6 +77,16 @@ No settings override. [`settings.environment_indicator.php`](https://github.com/drevops/vortex/blob/main/web/sites/default/includes/modules/settings.environment_indicator.php) names the indicator after the detected environment and colors it per environment - red for production, yellow for stage, green for dev - with the toolbar integration and favicon marker turned on. +## Fast 404 + +[Fast 404](https://www.drupal.org/project/fast_404) answers requests for missing files without bootstrapping Drupal. Drupal core already returns a lightweight 404 for the same file extensions, but only after a full bootstrap, so on a site serving many such requests the saving is the bootstrap itself. + +- **Installed:** Never enabled as a Drupal module. The handler runs from the settings file during the settings load, before the module system exists, so requiring the package is all that is needed. + +### Configuration + +[`settings.fast_404.php`](https://github.com/drevops/vortex/blob/main/web/sites/default/includes/modules/settings.fast_404.php) sets the file extensions to intercept, whitelists the front controller and the other entry-point scripts, allows anonymous access to image style derivatives, and calls `fast404_preboot()` with those settings. + ## Generated Content [Generated content](https://www.drupal.org/project/generated_content) generates deterministic placeholder content from declarative definitions for development and testing. diff --git a/.vortex/docs/cspell.json b/.vortex/docs/cspell.json index 3ed389df31..047eb52088 100644 --- a/.vortex/docs/cspell.json +++ b/.vortex/docs/cspell.json @@ -75,6 +75,7 @@ "phpcompatibility", "phpspec", "phpstorm", + "preboot", "pyrech", "redis", "renovatebot", diff --git a/.vortex/installer/src/Prompts/Handlers/Modules.php b/.vortex/installer/src/Prompts/Handlers/Modules.php index 053508946f..01b1fd785a 100644 --- a/.vortex/installer/src/Prompts/Handlers/Modules.php +++ b/.vortex/installer/src/Prompts/Handlers/Modules.php @@ -159,6 +159,7 @@ public static function getAvailableModules(): array { 'devel' => 'Devel', 'drupal_helpers' => 'Drupal helpers', 'environment_indicator' => 'Environment indicator', + 'fast_404' => 'Fast 404', 'generated_content' => 'Generated content', 'navigation_extra_tools' => 'Navigation extra tools', 'pathauto' => 'Pathauto', diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json b/.vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json index 72bcb955bb..f7f7db3224 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json @@ -17,6 +17,7 @@ "drupal/devel": "__VERSION__", "drupal/drupal_helpers": "__VERSION__", "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b1257d3531..7a2cbd0307 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -96,6 +96,17 @@ public function testEnvironmentNoOverrides(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = '
The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -109,6 +120,7 @@ public function testEnvironmentNoOverrides(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -181,6 +193,17 @@ public function testEnvironmentOverrides(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; $settings['file_public_path'] = 'custom_public'; $settings['file_private_path'] = 'custom_private'; $settings['file_temp_path'] = 'custom_temp'; @@ -238,6 +261,17 @@ public function testEnvironmentLocal(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -252,6 +286,7 @@ public function testEnvironmentLocal(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -296,6 +331,17 @@ public function testEnvironmentLocalContainer(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -312,6 +358,7 @@ public function testEnvironmentLocalContainer(): void { '^example\-site\.docker\.amazee\.io$', '^nginx$', ]; + $this->assertSettings($settings); } @@ -397,6 +444,17 @@ public function testEnvironmentGha(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_CI; + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -411,6 +469,7 @@ public function testEnvironmentGha(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SettingsTestCase.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SettingsTestCase.php index bafacd49e9..55db30e37a 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SettingsTestCase.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SettingsTestCase.php @@ -209,6 +209,47 @@ protected function requireSettingsFile(array $pre_settings = [], array $pre_conf $this->databases = $databases; } + /** + * Require a per-module settings file with an explicit contrib path. + * + * Per-module settings files guarded by the presence of a module directory + * are unreachable through the site's own contrib path when the module is not + * required by the project. + * + * @param string $module + * Module name as it appears in the `settings.The requested URL "@path" was not found on this server.
', + ], + ]; + yield 'module not installed' => [ + FALSE, + [], + [ + 'fast404_exts' => NULL, + 'fast404_allow_anon_imagecache' => NULL, + 'fast404_whitelist' => NULL, + 'fast404_html' => NULL, + ], + ]; + } + + /** + * Create a contrib modules directory fixture. + * + * The Fast 404 module is not required by the project, so its settings file + * guard can only be satisfied by a stub. + * + * @param bool $with_fast404 + * Create a stub of the Fast 404 module within the fixture. The stub marks + * the directory when its preboot function is called. + * + * @return string + * Path to the contrib modules directory fixture. + */ + protected function createContribFixture(bool $with_fast404): string { + $this->contribFixture = getcwd() . '/.artifacts/tmp/' . uniqid('contrib-'); + + mkdir($this->contribFixture, 0777, TRUE); + + if ($with_fast404) { + $stub = <<<'PHP' + contribFixture . '/fast_404'); + file_put_contents($this->contribFixture . '/fast_404/fast404.inc', $stub); + } + + return $this->contribFixture; + } + + /** + * Remove the contrib modules directory fixture. + * + * @param string $path + * Path to the contrib modules directory fixture. + */ + protected function removeContribFixture(string $path): void { + foreach (glob($path . '/*/*') ?: [] as $file) { + unlink($file); + } + + foreach (glob($path . '/*', GLOB_ONLYDIR) ?: [] as $dir) { + rmdir($dir); + } + + rmdir($path); + } + /** * Test Redis settings. */ diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast_404.php similarity index 65% rename from .vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast404.php rename to .vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast_404.php index 148f7d255f..d5fcf8950d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast_404.php @@ -7,9 +7,8 @@ declare(strict_types=1); -if (file_exists($contrib_path . '/fast404/fast404.inc')) { - // @codeCoverageIgnoreStart - $settings['fast404_exts'] = '/^(?!robots).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +if (file_exists($contrib_path . '/fast_404/fast404.inc')) { + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_allow_anon_imagecache'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', @@ -19,10 +18,8 @@ 'update.php', 'xmlrpc.php', ]; - $settings['fast404_string_whitelisting'] = ['/advagg_']; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast404/fast404.inc'; + include_once $contrib_path . '/fast_404/fast404.inc'; // @phpstan-ignore-next-line fast404_preboot($settings); - // @codeCoverageIgnoreEnd } diff --git a/.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/code_coverage_provider_codecov_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/code_coverage_provider_codecov_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/code_coverage_provider_codecov_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/code_coverage_provider_codecov_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/composer.json b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/composer.json index 856b514cc9..e602c50434 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/composer.json @@ -1,4 +1,4 @@ -@@ -26,7 +26,6 @@ +@@ -27,7 +27,6 @@ "drupal/robotstxt": "__VERSION__", "drupal/sdc_devel": "__VERSION__", "drupal/search_api": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/composer.json b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/composer.json index d64a8c52ce..5ea09f8f80 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/composer.json @@ -1,4 +1,4 @@ -@@ -120,38 +120,38 @@ +@@ -121,38 +121,38 @@ "[web-root]/update.php": false }, "locations": { diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast_404.php similarity index 65% rename from .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast404.php rename to .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast_404.php index 148f7d255f..d5fcf8950d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast_404.php @@ -7,9 +7,8 @@ declare(strict_types=1); -if (file_exists($contrib_path . '/fast404/fast404.inc')) { - // @codeCoverageIgnoreStart - $settings['fast404_exts'] = '/^(?!robots).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +if (file_exists($contrib_path . '/fast_404/fast404.inc')) { + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_allow_anon_imagecache'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', @@ -19,10 +18,8 @@ 'update.php', 'xmlrpc.php', ]; - $settings['fast404_string_whitelisting'] = ['/advagg_']; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast404/fast404.inc'; + include_once $contrib_path . '/fast_404/fast404.inc'; // @phpstan-ignore-next-line fast404_preboot($settings); - // @codeCoverageIgnoreEnd } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 1c24089541..e5274a0fa7 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -49,13 +49,14 @@ } /** -@@ -408,6 +452,337 @@ +@@ -466,6 +510,409 @@ $settings['maintenance_theme'] = 'claro'; $settings['skip_permissions_hardening'] = TRUE; $settings['config_sync_directory'] = '../config/default'; + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -97,6 +98,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -110,6 +122,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -151,6 +164,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -164,6 +188,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -205,6 +230,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -218,6 +254,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -256,6 +293,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -269,6 +317,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -312,6 +361,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -324,6 +384,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -375,6 +436,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/SettingsTestCase.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/SettingsTestCase.php index 7823a4cb78..aad535a031 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/SettingsTestCase.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/SettingsTestCase.php @@ -7,3 +7,12 @@ protected function requireSettingsFile(array $pre_settings = [], array $pre_conf if (!file_exists($app_root)) { throw new \RuntimeException('Could not determine application root.'); +@@ -226,7 +226,7 @@ + * Array of configs to pre-populate. + */ + protected function requireModuleSettingsFile(string $module, string $contrib_path, array $pre_settings = [], array $pre_config = []): void { +- $app_root = getcwd() . '/web'; ++ $app_root = getcwd() . '/docroot'; + + if (!file_exists($app_root)) { + throw new \RuntimeException('Could not determine application root.'); diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/web/sites/default/includes/modules/-settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/web/sites/default/includes/modules/-settings.fast_404.php similarity index 100% rename from .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/web/sites/default/includes/modules/-settings.fast404.php rename to .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/web/sites/default/includes/modules/-settings.fast_404.php diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/composer.json b/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/composer.json index 7813ec6268..0ef00bdaef 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,7 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,7 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/lagoon_logs": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index ab2ed9bfa4..7f3b316ae4 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,9 +185,9 @@ } /** -@@ -412,6 +592,287 @@ - '^localhost$', +@@ -471,6 +651,335 @@ ]; + $this->assertSettings($settings); + } + @@ -235,6 +235,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -253,6 +264,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -300,6 +312,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -318,6 +341,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -365,6 +389,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -383,6 +418,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -428,6 +464,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -446,6 +493,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/composer.json b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/composer.json index d64a8c52ce..5ea09f8f80 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/composer.json @@ -1,4 +1,4 @@ -@@ -120,38 +120,38 @@ +@@ -121,38 +121,38 @@ "[web-root]/update.php": false }, "locations": { diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast_404.php similarity index 65% rename from .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast404.php rename to .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast_404.php index 148f7d255f..d5fcf8950d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast_404.php @@ -7,9 +7,8 @@ declare(strict_types=1); -if (file_exists($contrib_path . '/fast404/fast404.inc')) { - // @codeCoverageIgnoreStart - $settings['fast404_exts'] = '/^(?!robots).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +if (file_exists($contrib_path . '/fast_404/fast404.inc')) { + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_allow_anon_imagecache'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', @@ -19,10 +18,8 @@ 'update.php', 'xmlrpc.php', ]; - $settings['fast404_string_whitelisting'] = ['/advagg_']; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast404/fast404.inc'; + include_once $contrib_path . '/fast_404/fast404.inc'; // @phpstan-ignore-next-line fast404_preboot($settings); - // @codeCoverageIgnoreEnd } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 1c24089541..e5274a0fa7 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -49,13 +49,14 @@ } /** -@@ -408,6 +452,337 @@ +@@ -466,6 +510,409 @@ $settings['maintenance_theme'] = 'claro'; $settings['skip_permissions_hardening'] = TRUE; $settings['config_sync_directory'] = '../config/default'; + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -97,6 +98,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -110,6 +122,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -151,6 +164,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -164,6 +188,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -205,6 +230,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -218,6 +254,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -256,6 +293,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -269,6 +317,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -312,6 +361,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -324,6 +384,7 @@ + $settings['trusted_host_patterns'] = [ + '^localhost$', + ]; ++ + $this->assertSettings($settings); + } + @@ -375,6 +436,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/SettingsTestCase.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/SettingsTestCase.php index 7823a4cb78..aad535a031 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/SettingsTestCase.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/SettingsTestCase.php @@ -7,3 +7,12 @@ protected function requireSettingsFile(array $pre_settings = [], array $pre_conf if (!file_exists($app_root)) { throw new \RuntimeException('Could not determine application root.'); +@@ -226,7 +226,7 @@ + * Array of configs to pre-populate. + */ + protected function requireModuleSettingsFile(string $module, string $contrib_path, array $pre_settings = [], array $pre_config = []): void { +- $app_root = getcwd() . '/web'; ++ $app_root = getcwd() . '/docroot'; + + if (!file_exists($app_root)) { + throw new \RuntimeException('Could not determine application root.'); diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/web/sites/default/includes/modules/-settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/web/sites/default/includes/modules/-settings.fast_404.php similarity index 100% rename from .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/web/sites/default/includes/modules/-settings.fast404.php rename to .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/web/sites/default/includes/modules/-settings.fast_404.php diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/composer.json b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/composer.json index 7813ec6268..0ef00bdaef 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,7 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,7 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/lagoon_logs": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index ab2ed9bfa4..7f3b316ae4 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,9 +185,9 @@ } /** -@@ -412,6 +592,287 @@ - '^localhost$', +@@ -471,6 +651,335 @@ ]; + $this->assertSettings($settings); + } + @@ -235,6 +235,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -253,6 +264,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -300,6 +312,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -318,6 +341,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -365,6 +389,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -383,6 +418,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -428,6 +464,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -446,6 +493,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/composer.json index 7813ec6268..0ef00bdaef 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,7 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,7 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/lagoon_logs": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index ab2ed9bfa4..7f3b316ae4 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,9 +185,9 @@ } /** -@@ -412,6 +592,287 @@ - '^localhost$', +@@ -471,6 +651,335 @@ ]; + $this->assertSettings($settings); + } + @@ -235,6 +235,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -253,6 +264,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -300,6 +312,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -318,6 +341,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -365,6 +389,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -383,6 +418,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -428,6 +464,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -446,6 +493,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/composer.json index d97c45d6d7..0570175784 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,8 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,8 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/migrate_plus": "__VERSION__", + "drupal/migrate_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/tests/phpunit/Drupal/EnvironmentSettingsTest.php index abc65393b3..b69ba73853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -150,6 +150,13 @@ +@@ -162,6 +162,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/composer.json index d97c45d6d7..0570175784 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,8 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,8 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/migrate_plus": "__VERSION__", + "drupal/migrate_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 7046f6392e..d60a23a0d5 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -150,6 +150,13 @@ +@@ -162,6 +162,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; @@ -12,7 +12,7 @@ $this->assertEquals($databases, $this->databases); // Verify key config overrides. -@@ -356,9 +363,9 @@ +@@ -403,9 +410,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/composer.json index bfccd7b612..a75e30da0c 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,9 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,9 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/lagoon_logs": "__VERSION__", + "drupal/migrate_plus": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 944368a963..e94dc38c7e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,7 +185,7 @@ } /** -@@ -150,6 +330,13 @@ +@@ -162,6 +342,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; @@ -199,9 +199,9 @@ $this->assertEquals($databases, $this->databases); // Verify key config overrides. -@@ -412,6 +599,287 @@ - '^localhost$', +@@ -471,6 +658,335 @@ ]; + $this->assertSettings($settings); + } + @@ -249,6 +249,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -267,6 +278,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -314,6 +326,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -332,6 +355,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -379,6 +403,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -397,6 +432,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -442,6 +478,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -460,6 +507,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/composer.json index d97c45d6d7..0570175784 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,8 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,8 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/migrate_plus": "__VERSION__", + "drupal/migrate_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php index abc65393b3..b69ba73853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -150,6 +150,13 @@ +@@ -162,6 +162,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/composer.json index d97c45d6d7..0570175784 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,8 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,8 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/migrate_plus": "__VERSION__", + "drupal/migrate_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/tests/phpunit/Drupal/EnvironmentSettingsTest.php index abc65393b3..b69ba73853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -150,6 +150,13 @@ +@@ -162,6 +162,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/composer.json index d97c45d6d7..0570175784 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,8 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,8 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/migrate_plus": "__VERSION__", + "drupal/migrate_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/tests/phpunit/Drupal/EnvironmentSettingsTest.php index abc65393b3..b69ba73853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -150,6 +150,13 @@ +@@ -162,6 +162,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/composer.json index d97c45d6d7..0570175784 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,8 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,8 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/migrate_plus": "__VERSION__", + "drupal/migrate_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index abc65393b3..b69ba73853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -150,6 +150,13 @@ +@@ -162,6 +162,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/composer.json index d97c45d6d7..0570175784 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,8 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,8 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/migrate_plus": "__VERSION__", + "drupal/migrate_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/tests/phpunit/Drupal/EnvironmentSettingsTest.php index abc65393b3..b69ba73853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -150,6 +150,13 @@ +@@ -162,6 +162,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/composer.json b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/composer.json index d97c45d6d7..0570175784 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,8 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,8 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/migrate_plus": "__VERSION__", + "drupal/migrate_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/tests/phpunit/Drupal/EnvironmentSettingsTest.php index abc65393b3..b69ba73853 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -150,6 +150,13 @@ +@@ -162,6 +162,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 428a92b501..7d04460926 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -208,7 +208,6 @@ +@@ -231,7 +231,6 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -6,7 +6,7 @@ $config['environment_indicator.indicator']['bg_color'] = '#006600'; $config['environment_indicator.indicator']['fg_color'] = '#ffffff'; $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_LOCAL; -@@ -266,7 +265,6 @@ +@@ -301,7 +300,6 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -14,7 +14,7 @@ $config['environment_indicator.indicator']['bg_color'] = '#006600'; $config['environment_indicator.indicator']['fg_color'] = '#ffffff'; $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_LOCAL; -@@ -366,7 +364,6 @@ +@@ -413,7 +411,6 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/SwitchableSettingsTest.php index 476aa8044b..62759bede2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -76,91 +76,6 @@ +@@ -94,91 +94,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/composer.json index 3bca73f682..3b9378f124 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/composer.json @@ -5,4 +5,4 @@ - "drupal/devel": "__VERSION__", "drupal/drupal_helpers": "__VERSION__", "drupal/environment_indicator": "__VERSION__", - "drupal/generated_content": "__VERSION__", + "drupal/fast_404": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 3f691c0d4c..5fc93177d7 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ 'generated_content', 'reroute_email', 'sdc_devel', -@@ -171,7 +170,6 @@ +@@ -183,7 +182,6 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -14,7 +14,7 @@ 'generated_content', 'reroute_email', 'sdc_devel', -@@ -229,7 +227,6 @@ +@@ -252,7 +250,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -22,7 +22,7 @@ 'generated_content', 'reroute_email', 'sdc_devel', -@@ -287,7 +284,6 @@ +@@ -322,7 +319,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -30,7 +30,7 @@ 'generated_content', 'reroute_email', 'sdc_devel', -@@ -388,7 +384,6 @@ +@@ -435,7 +431,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/composer.json index 3ed17cf052..4fceba9033 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/composer.json @@ -5,8 +5,8 @@ - "drupal/devel": "__VERSION__", "drupal/drupal_helpers": "__VERSION__", "drupal/environment_indicator": "__VERSION__", - "drupal/generated_content": "__VERSION__", -@@ -24,7 +23,6 @@ + "drupal/fast_404": "__VERSION__", +@@ -25,7 +24,6 @@ "drupal/redis": "__VERSION__", "drupal/reroute_email": "__VERSION__", "drupal/robotstxt": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php index ba0a8bca0f..eb63880990 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -171,10 +169,8 @@ +@@ -183,10 +181,8 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -20,7 +20,7 @@ 'testmode', ]; $settings['config_sync_directory'] = 'custom_config'; -@@ -229,10 +225,8 @@ +@@ -252,10 +248,8 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -31,7 +31,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -287,10 +281,8 @@ +@@ -322,10 +316,8 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -42,7 +42,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -388,10 +380,8 @@ +@@ -435,10 +427,8 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/composer.json index fd5c081c4f..10ae965ce0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/composer.json @@ -1,15 +1,16 @@ -@@ -14,10 +14,8 @@ +@@ -14,11 +14,9 @@ "drupal/config_update": "__VERSION__", "drupal/core-composer-scaffold": "__VERSION__", "drupal/core-recommended": "__VERSION__", - "drupal/devel": "__VERSION__", "drupal/drupal_helpers": "__VERSION__", "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", - "drupal/generated_content": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", "drupal/redirect": "__VERSION__", -@@ -24,7 +22,6 @@ +@@ -25,7 +23,6 @@ "drupal/redis": "__VERSION__", "drupal/reroute_email": "__VERSION__", "drupal/robotstxt": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b8792de6d6..65abdc4836 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -171,10 +168,7 @@ +@@ -183,10 +180,7 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -20,7 +20,7 @@ 'testmode', ]; $settings['config_sync_directory'] = 'custom_config'; -@@ -229,10 +223,7 @@ +@@ -252,10 +246,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -31,7 +31,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -287,10 +278,7 @@ +@@ -322,10 +313,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -42,7 +42,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -388,10 +376,7 @@ +@@ -435,10 +423,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/composer.json index d185f9528d..e309bead75 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/composer.json @@ -1,15 +1,16 @@ -@@ -14,10 +14,8 @@ +@@ -14,11 +14,9 @@ "drupal/config_update": "__VERSION__", "drupal/core-composer-scaffold": "__VERSION__", "drupal/core-recommended": "__VERSION__", - "drupal/devel": "__VERSION__", "drupal/drupal_helpers": "__VERSION__", "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", - "drupal/generated_content": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", "drupal/redirect": "__VERSION__", -@@ -24,13 +22,11 @@ +@@ -25,13 +23,11 @@ "drupal/redis": "__VERSION__", "drupal/reroute_email": "__VERSION__", "drupal/robotstxt": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 571a332dda..c744bfb511 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -10,7 +10,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -171,11 +167,7 @@ +@@ -183,11 +179,7 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -22,7 +22,7 @@ ]; $settings['config_sync_directory'] = 'custom_config'; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -229,11 +221,7 @@ +@@ -252,11 +244,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -34,7 +34,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -287,11 +275,7 @@ +@@ -322,11 +310,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -46,7 +46,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -388,11 +372,7 @@ +@@ -435,11 +419,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/composer.json index 0964463a7e..068eb5e285 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/composer.json @@ -1,10 +1,11 @@ -@@ -14,23 +14,18 @@ +@@ -14,24 +14,19 @@ "drupal/config_update": "__VERSION__", "drupal/core-composer-scaffold": "__VERSION__", "drupal/core-recommended": "__VERSION__", - "drupal/devel": "__VERSION__", "drupal/drupal_helpers": "__VERSION__", "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", - "drupal/generated_content": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 320c6e1ac9..61075c6d07 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -18,7 +18,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -162,9 +154,6 @@ +@@ -174,9 +166,6 @@ $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; @@ -28,7 +28,7 @@ $config['system.performance']['cache']['page']['max_age'] = 1800; $this->assertConfig($config); -@@ -171,11 +160,6 @@ +@@ -183,11 +172,6 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -40,7 +40,7 @@ ]; $settings['config_sync_directory'] = 'custom_config'; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -220,9 +204,6 @@ +@@ -243,9 +227,6 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -50,7 +50,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -229,11 +210,6 @@ +@@ -252,11 +233,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -62,7 +62,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -278,9 +254,6 @@ +@@ -313,9 +289,6 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -72,7 +72,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -287,11 +260,6 @@ +@@ -322,11 +295,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -84,7 +84,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -379,9 +347,6 @@ +@@ -426,9 +394,6 @@ $config['system.logging']['error_level'] = 'all'; $config['system.mail']['interface']['default'] = 'test_mail_collector'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -94,7 +94,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -388,11 +353,6 @@ +@@ -435,11 +400,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php index 2c1705e3eb..371b43742b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -665,156 +665,6 @@ +@@ -780,156 +780,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_drupal_helpers/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_drupal_helpers/composer.json index ef2d2be00f..3da9edf20b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_drupal_helpers/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_drupal_helpers/composer.json @@ -4,5 +4,5 @@ "drupal/devel": "__VERSION__", - "drupal/drupal_helpers": "__VERSION__", "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", - "drupal/navigation_extra_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/composer.json index 1daad799ee..6f8bf8b1df 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/composer.json @@ -3,6 +3,6 @@ "drupal/devel": "__VERSION__", "drupal/drupal_helpers": "__VERSION__", - "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", - "drupal/pathauto": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/EnvironmentSettingsTest.php index c2afc63476..053bb8fd13 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -10,7 +10,7 @@ $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; -@@ -153,11 +148,6 @@ +@@ -165,11 +160,6 @@ $this->assertEquals($databases, $this->databases); // Verify key config overrides. @@ -22,7 +22,7 @@ $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; -@@ -209,11 +199,6 @@ +@@ -232,11 +222,6 @@ $config['automated_cron.settings']['interval'] = 0; $config['config_split.config_split.local']['status'] = TRUE; @@ -34,7 +34,7 @@ $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; -@@ -267,11 +252,6 @@ +@@ -302,11 +287,6 @@ $config['automated_cron.settings']['interval'] = 0; $config['config_split.config_split.local']['status'] = TRUE; @@ -46,7 +46,7 @@ $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; -@@ -367,11 +347,6 @@ +@@ -414,11 +394,6 @@ $config['automated_cron.settings']['interval'] = 0; $config['config_split.config_split.ci']['status'] = TRUE; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/SwitchableSettingsTest.php index 0c6765d951..040a9cf13f 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -161,69 +161,6 @@ +@@ -179,69 +179,6 @@ } /** @@ -65,6 +65,6 @@ - } - - /** - * Test Redis settings. - */ - public function testRedis(): void { + * Test Fast 404 settings. + * + * Runs isolated so that the module stub owns the 'fast404_preboot()' diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/composer.json new file mode 100644 index 0000000000..127ade0d18 --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/composer.json @@ -0,0 +1,8 @@ +@@ -17,7 +17,6 @@ + "drupal/devel": "__VERSION__", + "drupal/drupal_helpers": "__VERSION__", + "drupal/environment_indicator": "__VERSION__", +- "drupal/fast_404": "__VERSION__", + "drupal/generated_content": "__VERSION__", + "drupal/navigation_extra_tools": "__VERSION__", + "drupal/pathauto": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/EnvironmentSettingsTest.php new file mode 100644 index 0000000000..174b289948 --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -0,0 +1,90 @@ +@@ -96,17 +96,6 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_SUT; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; +@@ -193,17 +182,6 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_SUT; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'custom_public'; + $settings['file_private_path'] = 'custom_private'; + $settings['file_temp_path'] = 'custom_temp'; +@@ -261,17 +239,6 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_LOCAL; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; +@@ -331,17 +298,6 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_LOCAL; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; +@@ -444,17 +400,6 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_CI; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/SwitchableSettingsTest.php new file mode 100644 index 0000000000..62df4887ee --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -0,0 +1,136 @@ +@@ -4,8 +4,6 @@ + + namespace Drupal; + +-use PHPUnit\Framework\Attributes\PreserveGlobalState; +-use PHPUnit\Framework\Attributes\RunInSeparateProcess; + use PHPUnit\Framework\Attributes\DataProvider; + use PHPUnit\Framework\Attributes\Group; + +@@ -22,22 +20,6 @@ + class SwitchableSettingsTest extends SettingsTestCase { + + /** +- * Path to the contrib modules directory fixture. +- */ +- protected ?string $contribFixture = NULL; +- +- /** +- * {@inheritdoc} +- */ +- protected function tearDown(): void { +- if (!is_null($this->contribFixture)) { +- $this->removeContribFixture($this->contribFixture); +- } +- +- parent::tearDown(); +- } +- +- /** + * Test ClamAV configs in Daemon mode with defaults. + */ + public function testClamavDaemonCustom(): void { +@@ -239,103 +221,6 @@ + 'environment_indicator.settings' => ['toolbar_integration' => [TRUE], 'favicon' => TRUE], + ], + ]; +- } +- +- /** +- * Test Fast 404 settings. +- * +- * Runs isolated so that the module stub owns the 'fast404_preboot()' +- * declaration and its invocation marker is conclusive. +- */ +- #[DataProvider('dataProviderFast404')] +- #[RunInSeparateProcess] +- #[PreserveGlobalState(FALSE)] +- public function testFast404(bool $module_installed, array $expected_present, array $expected_absent = []): void { +- $contrib_path = $this->createContribFixture($module_installed); +- +- $this->requireModuleSettingsFile('fast_404', $contrib_path); +- +- $this->assertSettingsContains($expected_present); +- $this->assertSettingsNotContains($expected_absent); +- $this->assertSame($module_installed, file_exists($contrib_path . '/fast_404/preboot'), 'Preboot invocation'); +- } +- +- /** +- * Data provider for testFast404(). +- */ +- public static function dataProviderFast404(): \Iterator { +- yield 'module installed' => [ +- TRUE, +- [ +- 'fast404_exts' => '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i', +- 'fast404_allow_anon_imagecache' => TRUE, +- 'fast404_whitelist' => ['index.php', 'rss.xml', 'install.php', 'cron.php', 'update.php', 'xmlrpc.php'], +- 'fast404_html' => 'The requested URL "@path" was not found on this server.
', +- ], +- ]; +- yield 'module not installed' => [ +- FALSE, +- [], +- [ +- 'fast404_exts' => NULL, +- 'fast404_allow_anon_imagecache' => NULL, +- 'fast404_whitelist' => NULL, +- 'fast404_html' => NULL, +- ], +- ]; +- } +- +- /** +- * Create a contrib modules directory fixture. +- * +- * The Fast 404 module is not required by the project, so its settings file +- * guard can only be satisfied by a stub. +- * +- * @param bool $with_fast404 +- * Create a stub of the Fast 404 module within the fixture. The stub marks +- * the directory when its preboot function is called. +- * +- * @return string +- * Path to the contrib modules directory fixture. +- */ +- protected function createContribFixture(bool $with_fast404): string { +- $this->contribFixture = getcwd() . '/.artifacts/tmp/' . uniqid('contrib-'); +- +- mkdir($this->contribFixture, 0777, TRUE); +- +- if ($with_fast404) { +- $stub = <<<'PHP' +- contribFixture . '/fast_404'); +- file_put_contents($this->contribFixture . '/fast_404/fast404.inc', $stub); +- } +- +- return $this->contribFixture; +- } +- +- /** +- * Remove the contrib modules directory fixture. +- * +- * @param string $path +- * Path to the contrib modules directory fixture. +- */ +- protected function removeContribFixture(string $path): void { +- foreach (glob($path . '/*/*') ?: [] as $file) { +- unlink($file); +- } +- +- foreach (glob($path . '/*', GLOB_ONLYDIR) ?: [] as $dir) { +- rmdir($dir); +- } +- +- rmdir($path); + } + + /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/web/sites/default/includes/modules/-settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/web/sites/default/includes/modules/-settings.fast_404.php new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/composer.json index 5f04d5acef..b343647ade 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/composer.json @@ -1,7 +1,7 @@ -@@ -17,7 +17,6 @@ - "drupal/devel": "__VERSION__", +@@ -18,7 +18,6 @@ "drupal/drupal_helpers": "__VERSION__", "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", - "drupal/generated_content": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 963432045b..a8c42046ec 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ 'reroute_email', 'sdc_devel', 'testmode', -@@ -172,7 +171,6 @@ +@@ -184,7 +183,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ 'devel', @@ -14,7 +14,7 @@ 'reroute_email', 'sdc_devel', 'testmode', -@@ -230,7 +228,6 @@ +@@ -253,7 +251,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ 'devel', @@ -22,7 +22,7 @@ 'reroute_email', 'sdc_devel', 'testmode', -@@ -288,7 +285,6 @@ +@@ -323,7 +320,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ 'devel', @@ -30,7 +30,7 @@ 'reroute_email', 'sdc_devel', 'testmode', -@@ -389,7 +385,6 @@ +@@ -436,7 +432,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ 'devel', diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/composer.json index dcf223d36a..090d1634f5 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/composer.json @@ -1,6 +1,6 @@ -@@ -18,7 +18,6 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,7 +19,6 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", - "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/composer.json index 1486737001..adebd85642 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/composer.json @@ -1,5 +1,5 @@ -@@ -19,7 +19,6 @@ - "drupal/environment_indicator": "__VERSION__", +@@ -20,7 +20,6 @@ + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", - "drupal/pathauto": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/composer.json index 2c425ccd88..509edcc60c 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/composer.json @@ -1,4 +1,4 @@ -@@ -20,7 +20,6 @@ +@@ -21,7 +21,6 @@ "drupal/generated_content": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/composer.json index 8d714c148b..96d8498c19 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/composer.json @@ -1,4 +1,4 @@ -@@ -22,7 +22,6 @@ +@@ -23,7 +23,6 @@ "drupal/pathauto": "__VERSION__", "drupal/redirect": "__VERSION__", "drupal/redis": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php index ea3870a1f9..2984bea6a8 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -16,7 +16,7 @@ 'sdc_devel', 'testmode', ]; -@@ -162,9 +158,6 @@ +@@ -174,9 +170,6 @@ $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; @@ -26,7 +26,7 @@ $config['system.performance']['cache']['page']['max_age'] = 1800; $this->assertConfig($config); -@@ -173,7 +166,6 @@ +@@ -185,7 +178,6 @@ $settings['config_exclude_modules'] = [ 'devel', 'generated_content', @@ -34,7 +34,7 @@ 'sdc_devel', 'testmode', ]; -@@ -220,9 +212,6 @@ +@@ -243,9 +235,6 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -44,7 +44,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -231,7 +220,6 @@ +@@ -254,7 +243,6 @@ $settings['config_exclude_modules'] = [ 'devel', 'generated_content', @@ -52,7 +52,7 @@ 'sdc_devel', 'testmode', ]; -@@ -278,9 +266,6 @@ +@@ -313,9 +301,6 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -62,7 +62,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -289,7 +274,6 @@ +@@ -324,7 +309,6 @@ $settings['config_exclude_modules'] = [ 'devel', 'generated_content', @@ -70,7 +70,7 @@ 'sdc_devel', 'testmode', ]; -@@ -379,9 +363,6 @@ +@@ -426,9 +410,6 @@ $config['system.logging']['error_level'] = 'all'; $config['system.mail']['interface']['default'] = 'test_mail_collector'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -80,7 +80,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -390,7 +371,6 @@ +@@ -437,7 +418,6 @@ $settings['config_exclude_modules'] = [ 'devel', 'generated_content', diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php index 2c1705e3eb..371b43742b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -665,156 +665,6 @@ +@@ -780,156 +780,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/composer.json index 47c0a5c760..22d552aa68 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/composer.json @@ -1,4 +1,4 @@ -@@ -23,7 +23,6 @@ +@@ -24,7 +24,6 @@ "drupal/redirect": "__VERSION__", "drupal/redis": "__VERSION__", "drupal/reroute_email": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 3d2745c64c..6cf455f914 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; -@@ -158,7 +157,6 @@ +@@ -170,7 +169,6 @@ $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_SUT; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; @@ -14,7 +14,7 @@ $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; -@@ -214,7 +212,6 @@ +@@ -237,7 +235,6 @@ $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_LOCAL; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; @@ -22,7 +22,7 @@ $config['shield.settings']['shield_enable'] = FALSE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; -@@ -272,7 +269,6 @@ +@@ -307,7 +304,6 @@ $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_LOCAL; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; @@ -30,7 +30,7 @@ $config['shield.settings']['shield_enable'] = FALSE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; -@@ -372,7 +368,6 @@ +@@ -419,7 +415,6 @@ $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_CI; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/composer.json index cff02750b8..8020dd7719 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/composer.json @@ -1,4 +1,4 @@ -@@ -24,7 +24,6 @@ +@@ -25,7 +25,6 @@ "drupal/redis": "__VERSION__", "drupal/reroute_email": "__VERSION__", "drupal/robotstxt": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php index c61f428b5a..1b420dba7e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -174,7 +173,6 @@ +@@ -186,7 +185,6 @@ 'devel', 'generated_content', 'reroute_email', @@ -14,7 +14,7 @@ 'testmode', ]; $settings['config_sync_directory'] = 'custom_config'; -@@ -232,7 +230,6 @@ +@@ -255,7 +253,6 @@ 'devel', 'generated_content', 'reroute_email', @@ -22,7 +22,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -290,7 +287,6 @@ +@@ -325,7 +322,6 @@ 'devel', 'generated_content', 'reroute_email', @@ -30,7 +30,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -391,7 +387,6 @@ +@@ -438,7 +434,6 @@ 'devel', 'generated_content', 'reroute_email', diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/composer.json index 96b20ce648..fd2e605283 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/composer.json @@ -1,4 +1,4 @@ -@@ -27,7 +27,6 @@ +@@ -28,7 +28,6 @@ "drupal/sdc_devel": "__VERSION__", "drupal/search_api": "__VERSION__", "drupal/search_api_solr": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b41a5d5be4..8b8c997a38 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -223,8 +223,6 @@ +@@ -246,8 +246,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; @@ -7,7 +7,7 @@ $this->assertConfig($config); $settings['auto_create_htaccess'] = FALSE; -@@ -281,8 +279,6 @@ +@@ -316,8 +314,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; @@ -16,7 +16,7 @@ $this->assertConfig($config); $settings['auto_create_htaccess'] = FALSE; -@@ -382,8 +378,6 @@ +@@ -429,8 +425,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/composer.json index 3536ab6c60..d2cc1f6161 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/composer.json @@ -1,4 +1,4 @@ -@@ -27,9 +27,6 @@ +@@ -28,9 +28,6 @@ "drupal/sdc_devel": "__VERSION__", "drupal/search_api": "__VERSION__", "drupal/search_api_solr": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 5be338c73c..7d6a428549 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; -@@ -159,7 +158,6 @@ +@@ -171,7 +170,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -14,7 +14,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; -@@ -215,7 +213,6 @@ +@@ -238,7 +236,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -22,7 +22,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -223,8 +220,6 @@ +@@ -246,8 +243,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; @@ -31,7 +31,7 @@ $this->assertConfig($config); $settings['auto_create_htaccess'] = FALSE; -@@ -273,7 +268,6 @@ +@@ -308,7 +303,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -39,7 +39,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -281,8 +275,6 @@ +@@ -316,8 +310,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; @@ -48,7 +48,7 @@ $this->assertConfig($config); $settings['auto_create_htaccess'] = FALSE; -@@ -373,7 +365,6 @@ +@@ -420,7 +412,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -56,7 +56,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -382,8 +373,6 @@ +@@ -429,8 +420,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php index a075466214..c05bf56247 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -296,375 +296,6 @@ +@@ -411,375 +411,6 @@ } /** @@ -374,7 +374,7 @@ * Test Reroute Email config. */ #[DataProvider('dataProviderRerouteEmail')] -@@ -811,131 +442,6 @@ +@@ -926,131 +557,6 @@ [ 'reroute_email.settings' => ['enable' => FALSE], ], diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/composer.json index b4e960b217..c614485bf4 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/composer.json @@ -1,4 +1,4 @@ -@@ -28,7 +28,6 @@ +@@ -29,7 +29,6 @@ "drupal/search_api": "__VERSION__", "drupal/search_api_solr": "__VERSION__", "drupal/seckit": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/EnvironmentSettingsTest.php index d49055ca19..ee2b089c11 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; -@@ -159,7 +158,6 @@ +@@ -171,7 +170,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -14,7 +14,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; -@@ -215,7 +213,6 @@ +@@ -238,7 +236,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -22,7 +22,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -273,7 +270,6 @@ +@@ -308,7 +305,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -30,7 +30,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -373,7 +369,6 @@ +@@ -420,7 +416,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/SwitchableSettingsTest.php index bf029efa47..371119235b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -296,375 +296,6 @@ +@@ -411,375 +411,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/composer.json index 76e9c8e34c..cdfd5f0e42 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/composer.json @@ -1,4 +1,4 @@ -@@ -29,7 +29,6 @@ +@@ -30,7 +30,6 @@ "drupal/search_api_solr": "__VERSION__", "drupal/seckit": "__VERSION__", "drupal/shield": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php index 42e76540b5..58ba7fb82f 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -815,131 +815,6 @@ +@@ -930,131 +930,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/composer.json index da730bd25e..eb064138ff 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/composer.json @@ -1,4 +1,4 @@ -@@ -30,7 +30,6 @@ +@@ -31,7 +31,6 @@ "drupal/seckit": "__VERSION__", "drupal/shield": "__VERSION__", "drupal/stage_file_proxy": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b4de93c747..3d89c52f6b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -175,7 +174,6 @@ +@@ -187,7 +186,6 @@ 'generated_content', 'reroute_email', 'sdc_devel', @@ -14,7 +14,7 @@ ]; $settings['config_sync_directory'] = 'custom_config'; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -233,7 +231,6 @@ +@@ -256,7 +254,6 @@ 'generated_content', 'reroute_email', 'sdc_devel', @@ -22,7 +22,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -291,7 +288,6 @@ +@@ -326,7 +323,6 @@ 'generated_content', 'reroute_email', 'sdc_devel', @@ -30,7 +30,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -392,7 +388,6 @@ +@@ -439,7 +435,6 @@ 'generated_content', 'reroute_email', 'sdc_devel', diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/composer.json index 81380780a5..45bc2df4c9 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/composer.json @@ -1,4 +1,4 @@ -@@ -31,7 +31,6 @@ +@@ -32,7 +32,6 @@ "drupal/shield": "__VERSION__", "drupal/stage_file_proxy": "__VERSION__", "drupal/testmode": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/tests/phpunit/Drupal/EnvironmentSettingsTest.php index d687d58cac..76d02a4739 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; -@@ -160,7 +159,6 @@ +@@ -172,7 +171,6 @@ $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = TRUE; @@ -14,7 +14,7 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; -@@ -216,7 +214,6 @@ +@@ -239,7 +237,6 @@ $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; @@ -22,7 +22,7 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; -@@ -274,7 +271,6 @@ +@@ -309,7 +306,6 @@ $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; @@ -30,7 +30,7 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; -@@ -374,7 +370,6 @@ +@@ -421,7 +417,6 @@ $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_none/composer.json b/.vortex/installer/tests/Fixtures/handler_process/modules_none/composer.json index 31cc5c9bd1..69ee91580d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_none/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_none/composer.json @@ -1,4 +1,4 @@ -@@ -9,29 +9,11 @@ +@@ -9,30 +9,11 @@ "cweagans/composer-patches": "__VERSION__", "drevops/vortex-tooling": "__VERSION__", "drupal/clamav": "__VERSION__", @@ -10,6 +10,7 @@ - "drupal/devel": "__VERSION__", - "drupal/drupal_helpers": "__VERSION__", - "drupal/environment_indicator": "__VERSION__", +- "drupal/fast_404": "__VERSION__", - "drupal/generated_content": "__VERSION__", - "drupal/navigation_extra_tools": "__VERSION__", - "drupal/pathauto": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 3f380ed505..a300a6168b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -70,28 +70,12 @@ +@@ -70,43 +70,16 @@ $this->requireSettingsFile(); @@ -27,7 +27,22 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -153,18 +137,7 @@ + $settings['environment'] = self::ENVIRONMENT_SUT; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; +@@ -165,18 +138,7 @@ $this->assertEquals($databases, $this->databases); // Verify key config overrides. @@ -46,7 +61,7 @@ $config['system.performance']['cache']['page']['max_age'] = 1800; $this->assertConfig($config); -@@ -171,11 +144,6 @@ +@@ -183,27 +145,11 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -58,7 +73,23 @@ ]; $settings['config_sync_directory'] = 'custom_config'; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -208,32 +176,13 @@ + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_SUT; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'custom_public'; + $settings['file_private_path'] = 'custom_private'; + $settings['file_temp_path'] = 'custom_temp'; +@@ -231,47 +177,17 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -91,7 +122,22 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -266,32 +215,13 @@ + $settings['environment'] = self::ENVIRONMENT_LOCAL; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; +@@ -301,47 +217,17 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -124,7 +170,22 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -366,33 +296,14 @@ + $settings['environment'] = self::ENVIRONMENT_LOCAL; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; +@@ -413,48 +299,18 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -158,3 +219,18 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_CI; +- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +- $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_whitelist'] = [ +- 'index.php', +- 'rss.xml', +- 'install.php', +- 'cron.php', +- 'update.php', +- 'xmlrpc.php', +- ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/SwitchableSettingsTest.php index 2b1419fd75..5b1819d717 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,36 @@ -@@ -76,154 +76,6 @@ +@@ -4,8 +4,6 @@ + + namespace Drupal; + +-use PHPUnit\Framework\Attributes\PreserveGlobalState; +-use PHPUnit\Framework\Attributes\RunInSeparateProcess; + use PHPUnit\Framework\Attributes\DataProvider; + use PHPUnit\Framework\Attributes\Group; + +@@ -22,22 +20,6 @@ + class SwitchableSettingsTest extends SettingsTestCase { + + /** +- * Path to the contrib modules directory fixture. +- */ +- protected ?string $contribFixture = NULL; +- +- /** +- * {@inheritdoc} +- */ +- protected function tearDown(): void { +- if (!is_null($this->contribFixture)) { +- $this->removeContribFixture($this->contribFixture); +- } +- +- parent::tearDown(); +- } +- +- /** + * Test ClamAV configs in Daemon mode with defaults. + */ + public function testClamavDaemonCustom(): void { +@@ -94,251 +76,6 @@ } /** @@ -149,11 +181,108 @@ - ]; - } - +- /** +- * Test Fast 404 settings. +- * +- * Runs isolated so that the module stub owns the 'fast404_preboot()' +- * declaration and its invocation marker is conclusive. +- */ +- #[DataProvider('dataProviderFast404')] +- #[RunInSeparateProcess] +- #[PreserveGlobalState(FALSE)] +- public function testFast404(bool $module_installed, array $expected_present, array $expected_absent = []): void { +- $contrib_path = $this->createContribFixture($module_installed); +- +- $this->requireModuleSettingsFile('fast_404', $contrib_path); +- +- $this->assertSettingsContains($expected_present); +- $this->assertSettingsNotContains($expected_absent); +- $this->assertSame($module_installed, file_exists($contrib_path . '/fast_404/preboot'), 'Preboot invocation'); +- } +- +- /** +- * Data provider for testFast404(). +- */ +- public static function dataProviderFast404(): \Iterator { +- yield 'module installed' => [ +- TRUE, +- [ +- 'fast404_exts' => '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i', +- 'fast404_allow_anon_imagecache' => TRUE, +- 'fast404_whitelist' => ['index.php', 'rss.xml', 'install.php', 'cron.php', 'update.php', 'xmlrpc.php'], +- 'fast404_html' => 'The requested URL "@path" was not found on this server.
', +- ], +- ]; +- yield 'module not installed' => [ +- FALSE, +- [], +- [ +- 'fast404_exts' => NULL, +- 'fast404_allow_anon_imagecache' => NULL, +- 'fast404_whitelist' => NULL, +- 'fast404_html' => NULL, +- ], +- ]; +- } +- +- /** +- * Create a contrib modules directory fixture. +- * +- * The Fast 404 module is not required by the project, so its settings file +- * guard can only be satisfied by a stub. +- * +- * @param bool $with_fast404 +- * Create a stub of the Fast 404 module within the fixture. The stub marks +- * the directory when its preboot function is called. +- * +- * @return string +- * Path to the contrib modules directory fixture. +- */ +- protected function createContribFixture(bool $with_fast404): string { +- $this->contribFixture = getcwd() . '/.artifacts/tmp/' . uniqid('contrib-'); +- +- mkdir($this->contribFixture, 0777, TRUE); +- +- if ($with_fast404) { +- $stub = <<<'PHP' +- contribFixture . '/fast_404'); +- file_put_contents($this->contribFixture . '/fast_404/fast404.inc', $stub); +- } +- +- return $this->contribFixture; +- } +- +- /** +- * Remove the contrib modules directory fixture. +- * +- * @param string $path +- * Path to the contrib modules directory fixture. +- */ +- protected function removeContribFixture(string $path): void { +- foreach (glob($path . '/*/*') ?: [] as $file) { +- unlink($file); +- } +- +- foreach (glob($path . '/*', GLOB_ONLYDIR) ?: [] as $dir) { +- rmdir($dir); +- } +- +- rmdir($path); +- } +- - /** * Test Redis settings. */ public function testRedis(): void { -@@ -293,650 +145,6 @@ +@@ -408,650 +145,6 @@ unset($this->settings['bootstrap_container_definition']); $this->assertSettingsContains($settings); diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_none/web/sites/default/includes/modules/-settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/modules_none/web/sites/default/includes/modules/-settings.fast_404.php new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 8b03a87db3..abc2b5a74e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ $config['system.performance']['cache']['page']['max_age'] = 900; $this->assertConfig($config); -@@ -163,8 +163,8 @@ +@@ -175,8 +175,8 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; @@ -20,7 +20,7 @@ $config['system.performance']['cache']['page']['max_age'] = 1800; $this->assertConfig($config); -@@ -221,8 +221,8 @@ +@@ -244,8 +244,8 @@ $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; $config['reroute_email.settings']['enable'] = FALSE; @@ -31,7 +31,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -279,8 +279,8 @@ +@@ -314,8 +314,8 @@ $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; $config['reroute_email.settings']['enable'] = FALSE; @@ -42,7 +42,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -380,8 +380,8 @@ +@@ -427,8 +427,8 @@ $config['system.mail']['interface']['default'] = 'test_mail_collector'; $config['system.performance']['cache']['page']['max_age'] = 900; $config['reroute_email.settings']['enable'] = FALSE; diff --git a/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/SwitchableSettingsTest.php index b99ef526c3..a9582593fd 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -686,7 +686,7 @@ +@@ -801,7 +801,7 @@ self::ENVIRONMENT_LOCAL, [], [ @@ -7,7 +7,7 @@ ], ]; -@@ -695,7 +695,7 @@ +@@ -810,7 +810,7 @@ self::ENVIRONMENT_CI, [], [ @@ -16,7 +16,7 @@ ], ]; -@@ -704,7 +704,7 @@ +@@ -819,7 +819,7 @@ self::ENVIRONMENT_DEV, [], [ @@ -25,7 +25,7 @@ ], ]; -@@ -713,7 +713,7 @@ +@@ -828,7 +828,7 @@ self::ENVIRONMENT_SUT, [], [ @@ -34,7 +34,7 @@ ], ]; -@@ -722,7 +722,7 @@ +@@ -837,7 +837,7 @@ self::ENVIRONMENT_STAGE, [], [ @@ -43,7 +43,7 @@ ], ]; -@@ -731,7 +731,7 @@ +@@ -846,7 +846,7 @@ self::ENVIRONMENT_PROD, [], [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/composer.json b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/composer.json index c5755fadb1..a5a7d2f740 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/composer.json @@ -7,7 +7,7 @@ "license": "proprietary", "type": "project", "require": { -@@ -21,7 +21,6 @@ +@@ -22,7 +22,6 @@ "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", "drupal/redirect": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php index 7a0f40014a..5cc551ee53 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -224,78 +224,6 @@ +@@ -339,78 +339,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/tests/phpunit/Drupal/SwitchableSettingsTest.php index 5441d77b3b..a2c5670bb2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,5 +1,5 @@ -@@ -20,62 +20,6 @@ - class SwitchableSettingsTest extends SettingsTestCase { +@@ -38,62 +38,6 @@ + } /** - * Test ClamAV configs in Daemon mode with defaults. diff --git a/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/composer.json b/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/composer.json index 7813ec6268..0ef00bdaef 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/composer.json @@ -1,6 +1,6 @@ -@@ -18,6 +18,7 @@ - "drupal/drupal_helpers": "__VERSION__", +@@ -19,6 +19,7 @@ "drupal/environment_indicator": "__VERSION__", + "drupal/fast_404": "__VERSION__", "drupal/generated_content": "__VERSION__", + "drupal/lagoon_logs": "__VERSION__", "drupal/navigation_extra_tools": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index ab2ed9bfa4..7f3b316ae4 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,9 +185,9 @@ } /** -@@ -412,6 +592,287 @@ - '^localhost$', +@@ -471,6 +651,335 @@ ]; + $this->assertSettings($settings); + } + @@ -235,6 +235,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -253,6 +264,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -300,6 +312,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -318,6 +341,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -365,6 +389,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -383,6 +418,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + @@ -428,6 +464,17 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; ++ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; ++ $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_whitelist'] = [ ++ 'index.php', ++ 'rss.xml', ++ 'install.php', ++ 'cron.php', ++ 'update.php', ++ 'xmlrpc.php', ++ ]; + $settings['file_public_path'] = 'sites/default/files'; + $settings['file_private_path'] = 'sites/default/files/private'; + $settings['file_temp_path'] = '/tmp'; @@ -446,6 +493,7 @@ + '^example1\.com$', + '^example2$', + ]; ++ + $this->assertSettings($settings); + } + diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/tests/phpunit/Drupal/SwitchableSettingsTest.php index 5441d77b3b..a2c5670bb2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,5 +1,5 @@ -@@ -20,62 +20,6 @@ - class SwitchableSettingsTest extends SettingsTestCase { +@@ -38,62 +38,6 @@ + } /** - * Test ClamAV configs in Daemon mode with defaults. diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/composer.json b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/composer.json index 63bd25f160..03f9dd2a33 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/composer.json @@ -1,4 +1,4 @@ -@@ -21,7 +21,6 @@ +@@ -22,7 +22,6 @@ "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", "drupal/redirect": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php index 7a0f40014a..5cc551ee53 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -224,78 +224,6 @@ +@@ -339,78 +339,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/composer.json b/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/composer.json index 856b514cc9..e602c50434 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/composer.json @@ -1,4 +1,4 @@ -@@ -26,7 +26,6 @@ +@@ -27,7 +27,6 @@ "drupal/robotstxt": "__VERSION__", "drupal/sdc_devel": "__VERSION__", "drupal/search_api": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_none/composer.json b/.vortex/installer/tests/Fixtures/handler_process/services_none/composer.json index 12736185df..94759f7d30 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_none/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/services_none/composer.json @@ -6,7 +6,7 @@ "drupal/coffee": "__VERSION__", "drupal/config_split": "__VERSION__", "drupal/config_update": "__VERSION__", -@@ -21,12 +20,10 @@ +@@ -22,12 +21,10 @@ "drupal/navigation_extra_tools": "__VERSION__", "drupal/pathauto": "__VERSION__", "drupal/redirect": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php index 115cd6d5c4..700e7a004d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,5 +1,5 @@ -@@ -20,62 +20,6 @@ - class SwitchableSettingsTest extends SettingsTestCase { +@@ -38,62 +38,6 @@ + } /** - * Test ClamAV configs in Daemon mode with defaults. @@ -61,10 +61,10 @@ class SwitchableSettingsTest extends SettingsTestCase { * Test Config Split config. */ #[DataProvider('dataProviderConfigSplit')] -@@ -221,78 +165,6 @@ - 'environment_indicator.settings' => ['toolbar_integration' => [TRUE], 'favicon' => TRUE], - ], - ]; +@@ -336,78 +280,6 @@ + } + + rmdir($path); - } - - /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/starter_drupal_cms_profile/composer.json b/.vortex/installer/tests/Fixtures/handler_process/starter_drupal_cms_profile/composer.json index 2a988a55c6..8448d72c07 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/starter_drupal_cms_profile/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/starter_drupal_cms_profile/composer.json @@ -6,7 +6,7 @@ "drupal/coffee": "__VERSION__", "drupal/config_split": "__VERSION__", "drupal/config_update": "__VERSION__", -@@ -32,7 +33,9 @@ +@@ -33,7 +34,9 @@ "drupal/stage_file_proxy": "__VERSION__", "drupal/testmode": "__VERSION__", "drupal/xmlsitemap": "__VERSION__", @@ -17,7 +17,7 @@ }, "require-dev": { "behat/behat": "__VERSION__", -@@ -65,7 +68,7 @@ +@@ -66,7 +69,7 @@ "url": "https://packages.drupal.org/8" } ], @@ -26,7 +26,7 @@ "prefer-stable": true, "autoload-dev": { "classmap": [ -@@ -83,7 +86,11 @@ +@@ -84,7 +87,11 @@ "phpstan/extension-installer": true, "pyrech/composer-changelogs": true, "symfony/runtime": true, @@ -39,7 +39,7 @@ }, "bump-after-update": true, "discard-changes": true, -@@ -158,6 +165,17 @@ +@@ -159,6 +166,17 @@ "patchLevel": { "drupal/core": "-p2" }, diff --git a/.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/composer.json index 12091e89d6..06491f51ea 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/composer.json @@ -1,4 +1,4 @@ -@@ -40,17 +40,10 @@ +@@ -41,17 +41,10 @@ "drevops/behat-format-progress-fail": "__VERSION__", "drevops/behat-screenshot": "__VERSION__", "drevops/behat-steps": "__VERSION__", @@ -16,7 +16,7 @@ "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", -@@ -76,11 +69,9 @@ +@@ -77,11 +70,9 @@ "allow-plugins": { "composer/installers": true, "cweagans/composer-patches": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast_404.php similarity index 70% rename from .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast404.php rename to .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast_404.php index 74b826db06..531f81035a 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast_404.php @@ -1,8 +1,7 @@ -@@ -22,7 +22,6 @@ - $settings['fast404_string_whitelisting'] = ['/advagg_']; +@@ -20,6 +20,5 @@ + ]; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast404/fast404.inc'; + include_once $contrib_path . '/fast_404/fast404.inc'; - // @phpstan-ignore-next-line fast404_preboot($settings); - // @codeCoverageIgnoreEnd } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json index 12091e89d6..06491f51ea 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json @@ -1,4 +1,4 @@ -@@ -40,17 +40,10 @@ +@@ -41,17 +41,10 @@ "drevops/behat-format-progress-fail": "__VERSION__", "drevops/behat-screenshot": "__VERSION__", "drevops/behat-steps": "__VERSION__", @@ -16,7 +16,7 @@ "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", -@@ -76,11 +69,9 @@ +@@ -77,11 +70,9 @@ "allow-plugins": { "composer/installers": true, "cweagans/composer-patches": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 1b2577e8cb..5452ce5f36 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ */ #[Group('drupal_settings')] class EnvironmentSettingsTest extends SettingsTestCase { -@@ -356,9 +352,9 @@ +@@ -403,9 +399,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast_404.php similarity index 70% rename from .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast404.php rename to .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast_404.php index 74b826db06..531f81035a 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast_404.php @@ -1,8 +1,7 @@ -@@ -22,7 +22,6 @@ - $settings['fast404_string_whitelisting'] = ['/advagg_']; +@@ -20,6 +20,5 @@ + ]; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast404/fast404.inc'; + include_once $contrib_path . '/fast_404/fast404.inc'; - // @phpstan-ignore-next-line fast404_preboot($settings); - // @codeCoverageIgnoreEnd } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json index 238bd99345..c186489cf3 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json @@ -1,4 +1,4 @@ -@@ -35,23 +35,15 @@ +@@ -36,23 +36,15 @@ "drush/drush": "__VERSION__" }, "require-dev": { @@ -22,7 +22,7 @@ "pyrech/composer-changelogs": "__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "__VERSION__" -@@ -67,11 +59,6 @@ +@@ -68,11 +60,6 @@ ], "minimum-stability": "stable", "prefer-stable": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/composer.json index 238bd99345..c186489cf3 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/composer.json @@ -1,4 +1,4 @@ -@@ -35,23 +35,15 @@ +@@ -36,23 +36,15 @@ "drush/drush": "__VERSION__" }, "require-dev": { @@ -22,7 +22,7 @@ "pyrech/composer-changelogs": "__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "__VERSION__" -@@ -67,11 +59,6 @@ +@@ -68,11 +60,6 @@ ], "minimum-stability": "stable", "prefer-stable": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/composer.json index f275b2cda5..9a5abe66df 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/composer.json @@ -1,4 +1,4 @@ -@@ -35,14 +35,8 @@ +@@ -36,14 +36,8 @@ "drush/drush": "__VERSION__" }, "require-dev": { diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/composer.json index f275b2cda5..9a5abe66df 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/composer.json @@ -1,4 +1,4 @@ -@@ -35,14 +35,8 @@ +@@ -36,14 +36,8 @@ "drush/drush": "__VERSION__" }, "require-dev": { diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_dclint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_dclint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_dclint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_dclint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_docker_linters_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_docker_linters_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_docker_linters_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_docker_linters_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_hadolint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_hadolint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_hadolint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_hadolint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_jest_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_jest_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_jest_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_jest_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs/composer.json index dc2f444123..29ff9be5e0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs/composer.json @@ -1,4 +1,4 @@ -@@ -40,14 +40,11 @@ +@@ -41,14 +41,11 @@ "drevops/behat-format-progress-fail": "__VERSION__", "drevops/behat-screenshot": "__VERSION__", "drevops/behat-steps": "__VERSION__", @@ -13,7 +13,7 @@ "phpspec/prophecy-phpunit": "__VERSION__", "phpstan/extension-installer": "__VERSION__", "phpstan/phpstan": "__VERSION__", -@@ -76,7 +73,6 @@ +@@ -77,7 +74,6 @@ "allow-plugins": { "composer/installers": true, "cweagans/composer-patches": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/composer.json index dc2f444123..29ff9be5e0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/composer.json @@ -1,4 +1,4 @@ -@@ -40,14 +40,11 @@ +@@ -41,14 +41,11 @@ "drevops/behat-format-progress-fail": "__VERSION__", "drevops/behat-screenshot": "__VERSION__", "drevops/behat-steps": "__VERSION__", @@ -13,7 +13,7 @@ "phpspec/prophecy-phpunit": "__VERSION__", "phpstan/extension-installer": "__VERSION__", "phpstan/phpstan": "__VERSION__", -@@ -76,7 +73,6 @@ +@@ -77,7 +74,6 @@ "allow-plugins": { "composer/installers": true, "cweagans/composer-patches": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 1b2577e8cb..5452ce5f36 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ */ #[Group('drupal_settings')] class EnvironmentSettingsTest extends SettingsTestCase { -@@ -356,9 +352,9 @@ +@@ -403,9 +399,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json index 81333b6fd8..a509248ce2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json @@ -1,4 +1,4 @@ -@@ -44,13 +44,10 @@ +@@ -45,13 +45,10 @@ "drupal/coder": "__VERSION__", "drupal/drupal-extension": "__VERSION__", "ergebnis/composer-normalize": "__VERSION__", @@ -12,7 +12,7 @@ "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", -@@ -80,7 +77,6 @@ +@@ -81,7 +78,6 @@ "drupal/core-composer-scaffold": true, "ergebnis/composer-normalize": true, "php-http/discovery": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast_404.php similarity index 70% rename from .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast404.php rename to .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast_404.php index 74b826db06..531f81035a 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast_404.php @@ -1,8 +1,7 @@ -@@ -22,7 +22,6 @@ - $settings['fast404_string_whitelisting'] = ['/advagg_']; +@@ -20,6 +20,5 @@ + ]; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast404/fast404.inc'; + include_once $contrib_path . '/fast_404/fast404.inc'; - // @phpstan-ignore-next-line fast404_preboot($settings); - // @codeCoverageIgnoreEnd } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json index 81333b6fd8..a509248ce2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json @@ -1,4 +1,4 @@ -@@ -44,13 +44,10 @@ +@@ -45,13 +45,10 @@ "drupal/coder": "__VERSION__", "drupal/drupal-extension": "__VERSION__", "ergebnis/composer-normalize": "__VERSION__", @@ -12,7 +12,7 @@ "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", -@@ -80,7 +77,6 @@ +@@ -81,7 +78,6 @@ "drupal/core-composer-scaffold": true, "ergebnis/composer-normalize": true, "php-http/discovery": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast_404.php similarity index 70% rename from .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast404.php rename to .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast_404.php index 74b826db06..531f81035a 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast_404.php @@ -1,8 +1,7 @@ -@@ -22,7 +22,6 @@ - $settings['fast404_string_whitelisting'] = ['/advagg_']; +@@ -20,6 +20,5 @@ + ]; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast404/fast404.inc'; + include_once $contrib_path . '/fast_404/fast404.inc'; - // @phpstan-ignore-next-line fast404_preboot($settings); - // @codeCoverageIgnoreEnd } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json index b6640d2d69..c5376599cb 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json @@ -1,4 +1,4 @@ -@@ -48,10 +48,8 @@ +@@ -49,10 +49,8 @@ "mikey179/vfsstream": "__VERSION__", "palantirnet/drupal-rector": "__VERSION__", "phpcompatibility/php-compatibility": "__VERSION__", @@ -9,7 +9,7 @@ "pyrech/composer-changelogs": "__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "__VERSION__" -@@ -67,11 +65,6 @@ +@@ -68,11 +66,6 @@ ], "minimum-stability": "stable", "prefer-stable": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/composer.json index b6640d2d69..c5376599cb 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/composer.json @@ -1,4 +1,4 @@ -@@ -48,10 +48,8 @@ +@@ -49,10 +49,8 @@ "mikey179/vfsstream": "__VERSION__", "palantirnet/drupal-rector": "__VERSION__", "phpcompatibility/php-compatibility": "__VERSION__", @@ -9,7 +9,7 @@ "pyrech/composer-changelogs": "__VERSION__", "softcreatr/jsonpath": "^0.10 || ^1.0", "vincentlanglet/twig-cs-fixer": "__VERSION__" -@@ -67,11 +65,6 @@ +@@ -68,11 +66,6 @@ ], "minimum-stability": "stable", "prefer-stable": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/composer.json index 8521d5fe57..2c6871fa54 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/composer.json @@ -1,4 +1,4 @@ -@@ -46,7 +46,6 @@ +@@ -47,7 +47,6 @@ "ergebnis/composer-normalize": "__VERSION__", "mglaman/phpstan-drupal": "__VERSION__", "mikey179/vfsstream": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json index 8521d5fe57..2c6871fa54 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json @@ -1,4 +1,4 @@ -@@ -46,7 +46,6 @@ +@@ -47,7 +47,6 @@ "ergebnis/composer-normalize": "__VERSION__", "mglaman/phpstan-drupal": "__VERSION__", "mikey179/vfsstream": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig/composer.json index 68844dc9dd..cb093527ef 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig/composer.json @@ -1,4 +1,4 @@ -@@ -53,8 +53,7 @@ +@@ -54,8 +54,7 @@ "phpstan/phpstan": "__VERSION__", "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/composer.json index 68844dc9dd..cb093527ef 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/composer.json @@ -1,4 +1,4 @@ -@@ -53,8 +53,7 @@ +@@ -54,8 +54,7 @@ "phpstan/phpstan": "__VERSION__", "phpunit/phpunit": "__VERSION__", "pyrech/composer-changelogs": "__VERSION__", diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 158e13f0a7..49f994e8f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -356,9 +356,9 @@ +@@ -403,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json b/.vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json index c3e6547b4f..c94b8e2099 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json @@ -1,4 +1,4 @@ -@@ -35,26 +35,10 @@ +@@ -36,26 +36,10 @@ "drush/drush": "__VERSION__" }, "require-dev": { @@ -26,7 +26,7 @@ }, "conflict": { "drupal/drupal": "*" -@@ -67,20 +51,13 @@ +@@ -68,20 +52,13 @@ ], "minimum-stability": "stable", "prefer-stable": true, diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast404.php deleted file mode 100644 index 74b826db06..0000000000 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast404.php +++ /dev/null @@ -1,8 +0,0 @@ -@@ -22,7 +22,6 @@ - $settings['fast404_string_whitelisting'] = ['/advagg_']; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast404/fast404.inc'; -- // @phpstan-ignore-next-line - fast404_preboot($settings); - // @codeCoverageIgnoreEnd - } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast_404.php new file mode 100644 index 0000000000..531f81035a --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast_404.php @@ -0,0 +1,7 @@ +@@ -20,6 +20,5 @@ + ]; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + include_once $contrib_path . '/fast_404/fast404.inc'; +- // @phpstan-ignore-next-line + fast404_preboot($settings); + } diff --git a/.vortex/installer/tests/Functional/Prompts/Handlers/ModulesHandlerProcessTest.php b/.vortex/installer/tests/Functional/Prompts/Handlers/ModulesHandlerProcessTest.php index 8411bdd96e..757cdbea1b 100644 --- a/.vortex/installer/tests/Functional/Prompts/Handlers/ModulesHandlerProcessTest.php +++ b/.vortex/installer/tests/Functional/Prompts/Handlers/ModulesHandlerProcessTest.php @@ -48,6 +48,12 @@ public static function dataProviderHandlerProcess(): \Iterator { }), static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('environment_indicator')), ]; + yield 'modules_no_fast_404' => [ + static::cw(function ($test): void { + $test->prompts[Modules::id()] = static::getModulesExcept('fast_404'); + }), + static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('fast_404')), + ]; yield 'modules_no_generated_content' => [ static::cw(function ($test): void { $test->prompts[Modules::id()] = static::getModulesExcept('generated_content'); diff --git a/.vortex/installer/tests/Unit/Prompts/Handlers/ModulesHandlerDiscoveryTest.php b/.vortex/installer/tests/Unit/Prompts/Handlers/ModulesHandlerDiscoveryTest.php index d84035eaa0..439c499959 100644 --- a/.vortex/installer/tests/Unit/Prompts/Handlers/ModulesHandlerDiscoveryTest.php +++ b/.vortex/installer/tests/Unit/Prompts/Handlers/ModulesHandlerDiscoveryTest.php @@ -44,6 +44,7 @@ function (AbstractHandlerDiscoveryTestCase $test, Config $config): void { 'drupal/devel' => '^5.5', 'drupal/drupal_helpers' => '^2.0.1', 'drupal/environment_indicator' => '^4.0.25', + 'drupal/fast_404' => '^3.7', 'drupal/generated_content' => '^2.0.1', 'drupal/navigation_extra_tools' => '^1.3.2', 'drupal/pathauto' => '^1.14', diff --git a/.vortex/tests/phpunit/Functional/AhoyWorkflowTest.php b/.vortex/tests/phpunit/Functional/AhoyWorkflowTest.php index 827f41749d..f633ca3d3d 100644 --- a/.vortex/tests/phpunit/Functional/AhoyWorkflowTest.php +++ b/.vortex/tests/phpunit/Functional/AhoyWorkflowTest.php @@ -70,6 +70,8 @@ public function testAhoyWorkflowStateless(): void { $this->subtestAhoyLintTests(); + $this->subtestAhoyFast404(); + $this->subtestAhoyReset(); $this->subtestAhoyResetHard(); diff --git a/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php b/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php index b4d7e4c7f5..40718a0361 100644 --- a/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php +++ b/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php @@ -1021,6 +1021,22 @@ protected function subtestAhoyRedis(): void { $this->logStepFinish(); } + protected function subtestAhoyFast404(): void { + $this->logStepStart(); + + $this->logSubstep('Assert that the preboot error page is served for a missing asset'); + // Drupal core serves a near-identical 404 page for the same extensions, + // so the DOCTYPE from `settings.fast_404.php` is what tells the two apart. + $this->assertWebpageContains('/missing.png', '-//W3C//DTD XHTML+RDFa 1.0//EN', 'Error page from `settings.fast_404.php` should be served'); + $this->assertWebpageContains('/missing.png', 'The requested URL "/missing.png" was not found on this server.', 'Error page should report the request path resolved before Drupal bootstraps'); + + $this->logSubstep('Assert that a route served by Drupal is not intercepted'); + $this->assertWebpageNotContains('/robots.txt', '-//W3C//DTD XHTML+RDFa 1.0//EN', '`robots.txt` is served by a module, so the preboot handler must let it through'); + $this->assertWebpageContains('/robots.txt', 'User-agent: *', '`robots.txt` should be served by Drupal'); + + $this->logStepFinish(); + } + protected function substepWarmCaches(): void { $this->logNote('Warming up caches'); $this->cmd('ahoy drush cr'); diff --git a/composer.json b/composer.json index ef5b5ec2e3..b36584c057 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "drupal/devel": "^5.5", "drupal/drupal_helpers": "^2.1.1", "drupal/environment_indicator": "^4.0.25", + "drupal/fast_404": "^3.7", "drupal/generated_content": "^2.1.1", "drupal/migrate_plus": "^6.0.10", "drupal/migrate_tools": "^6.1.4", diff --git a/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 304d9f0ffa..c53d3b713f 100644 --- a/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -334,6 +334,19 @@ public function testEnvironmentNoOverrides(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -347,6 +360,7 @@ public function testEnvironmentNoOverrides(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -438,6 +452,19 @@ public function testEnvironmentOverrides(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'custom_public'; $settings['file_private_path'] = 'custom_private'; $settings['file_temp_path'] = 'custom_temp'; @@ -505,6 +532,19 @@ public function testEnvironmentLocal(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -519,6 +559,7 @@ public function testEnvironmentLocal(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -574,6 +615,19 @@ public function testEnvironmentLocalContainer(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -590,6 +644,7 @@ public function testEnvironmentLocalContainer(): void { '^example\-site\.docker\.amazee\.io$', '^nginx$', ]; + $this->assertSettings($settings); } @@ -687,6 +742,19 @@ public function testEnvironmentCircleCi(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_CI; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -701,6 +769,7 @@ public function testEnvironmentCircleCi(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } // phpcs:ignore #;> SETTINGS_PROVIDER_CIRCLECI @@ -758,6 +827,19 @@ public function testEnvironmentGha(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_CI; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -772,6 +854,7 @@ public function testEnvironmentGha(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } // phpcs:ignore #;> SETTINGS_PROVIDER_GHA @@ -825,6 +908,19 @@ public function testEnvironmentAcquiaDynamic(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -838,6 +934,7 @@ public function testEnvironmentAcquiaDynamic(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -889,6 +986,19 @@ public function testEnvironmentAcquiaDev(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -902,6 +1012,7 @@ public function testEnvironmentAcquiaDev(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -953,6 +1064,19 @@ public function testEnvironmentAcquiaStage(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_STAGE; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -966,6 +1090,7 @@ public function testEnvironmentAcquiaStage(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -1014,6 +1139,19 @@ public function testEnvironmentAcquiaProd(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_PROD; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -1027,6 +1165,7 @@ public function testEnvironmentAcquiaProd(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -1080,6 +1219,19 @@ public function testEnvironmentAcquiaConfigPathOverride(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -1092,6 +1244,7 @@ public function testEnvironmentAcquiaConfigPathOverride(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -1153,6 +1306,19 @@ public function testEnvironmentAcquiaConfigVcsDirectoryFallback(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -1165,6 +1331,7 @@ public function testEnvironmentAcquiaConfigVcsDirectoryFallback(): void { $settings['trusted_host_patterns'] = [ '^localhost$', ]; + $this->assertSettings($settings); } @@ -1224,6 +1391,19 @@ public function testEnvironmentLagoonPreview(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -1242,6 +1422,7 @@ public function testEnvironmentLagoonPreview(): void { '^example1\.com$', '^example2$', ]; + $this->assertSettings($settings); } @@ -1299,6 +1480,19 @@ public function testEnvironmentLagoonDev(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -1317,6 +1511,7 @@ public function testEnvironmentLagoonDev(): void { '^example1\.com$', '^example2$', ]; + $this->assertSettings($settings); } @@ -1374,6 +1569,19 @@ public function testEnvironmentLagoonTest(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_STAGE; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -1392,6 +1600,7 @@ public function testEnvironmentLagoonTest(): void { '^example1\.com$', '^example2$', ]; + $this->assertSettings($settings); } @@ -1447,6 +1656,19 @@ public function testEnvironmentLagoonProd(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_PROD; + // phpcs:ignore #;< MODULE_FAST_404 + $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', + 'install.php', + 'cron.php', + 'update.php', + 'xmlrpc.php', + ]; + // phpcs:ignore #;> MODULE_FAST_404 $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; @@ -1465,6 +1687,7 @@ public function testEnvironmentLagoonProd(): void { '^example1\.com$', '^example2$', ]; + $this->assertSettings($settings); } diff --git a/tests/phpunit/Drupal/SettingsTestCase.php b/tests/phpunit/Drupal/SettingsTestCase.php index 4e4bfedd29..28e0cb388a 100644 --- a/tests/phpunit/Drupal/SettingsTestCase.php +++ b/tests/phpunit/Drupal/SettingsTestCase.php @@ -212,6 +212,47 @@ protected function requireSettingsFile(array $pre_settings = [], array $pre_conf $this->databases = $databases; } + /** + * Require a per-module settings file with an explicit contrib path. + * + * Per-module settings files guarded by the presence of a module directory + * are unreachable through the site's own contrib path when the module is not + * required by the project. + * + * @param string $module + * Module name as it appears in the `settings.The requested URL "@path" was not found on this server.
', + ], + ]; + yield 'module not installed' => [ + FALSE, + [], + [ + 'fast404_exts' => NULL, + 'fast404_allow_anon_imagecache' => NULL, + 'fast404_whitelist' => NULL, + 'fast404_html' => NULL, + ], + ]; + } + + /** + * Create a contrib modules directory fixture. + * + * The Fast 404 module is not required by the project, so its settings file + * guard can only be satisfied by a stub. + * + * @param bool $with_fast404 + * Create a stub of the Fast 404 module within the fixture. The stub marks + * the directory when its preboot function is called. + * + * @return string + * Path to the contrib modules directory fixture. + */ + protected function createContribFixture(bool $with_fast404): string { + $this->contribFixture = getcwd() . '/.artifacts/tmp/' . uniqid('contrib-'); + + mkdir($this->contribFixture, 0777, TRUE); + + if ($with_fast404) { + $stub = <<<'PHP' + contribFixture . '/fast_404'); + file_put_contents($this->contribFixture . '/fast_404/fast404.inc', $stub); + } + + return $this->contribFixture; + } + + /** + * Remove the contrib modules directory fixture. + * + * @param string $path + * Path to the contrib modules directory fixture. + */ + protected function removeContribFixture(string $path): void { + foreach (glob($path . '/*/*') ?: [] as $file) { + unlink($file); + } + + foreach (glob($path . '/*', GLOB_ONLYDIR) ?: [] as $dir) { + rmdir($dir); + } + + rmdir($path); + } + + // phpcs:ignore #;> MODULE_FAST_404 // phpcs:ignore #;< SERVICE_REDIS /** diff --git a/web/sites/default/includes/modules/settings.fast404.php b/web/sites/default/includes/modules/settings.fast_404.php similarity index 65% rename from web/sites/default/includes/modules/settings.fast404.php rename to web/sites/default/includes/modules/settings.fast_404.php index 148f7d255f..d5fcf8950d 100644 --- a/web/sites/default/includes/modules/settings.fast404.php +++ b/web/sites/default/includes/modules/settings.fast_404.php @@ -7,9 +7,8 @@ declare(strict_types=1); -if (file_exists($contrib_path . '/fast404/fast404.inc')) { - // @codeCoverageIgnoreStart - $settings['fast404_exts'] = '/^(?!robots).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +if (file_exists($contrib_path . '/fast_404/fast404.inc')) { + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_allow_anon_imagecache'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', @@ -19,10 +18,8 @@ 'update.php', 'xmlrpc.php', ]; - $settings['fast404_string_whitelisting'] = ['/advagg_']; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast404/fast404.inc'; + include_once $contrib_path . '/fast_404/fast404.inc'; // @phpstan-ignore-next-line fast404_preboot($settings); - // @codeCoverageIgnoreEnd }