diff --git a/.vortex/installer/src/Prompts/Handlers/Tools.php b/.vortex/installer/src/Prompts/Handlers/Tools.php index 739f36469..5bafdfcc0 100644 --- a/.vortex/installer/src/Prompts/Handlers/Tools.php +++ b/.vortex/installer/src/Prompts/Handlers/Tools.php @@ -302,8 +302,7 @@ public static function getToolDefinitions(string $filter = 'all'): array { self::PHPMD => [ 'title' => 'PHP Mess Detector', - 'present' => fn(): mixed => File::contains($this->dstDir . '/composer.json', 'phpmd/phpmd') || - File::exists($this->dstDir . '/phpmd.xml'), + 'present' => fn(): mixed => File::contains($this->dstDir . '/composer.json', 'phpmd/phpmd'), 'composer.json' => function (JsonManipulator $cj): void { $cj->removeSubNode('require-dev', 'phpmd/phpmd'); }, diff --git a/.vortex/installer/src/Prompts/Handlers/Webroot.php b/.vortex/installer/src/Prompts/Handlers/Webroot.php index 1451b30a7..aa6c119f0 100644 --- a/.vortex/installer/src/Prompts/Handlers/Webroot.php +++ b/.vortex/installer/src/Prompts/Handlers/Webroot.php @@ -144,12 +144,13 @@ public function process(): void { sprintf('%s/', $webroot) => $v . '/', sprintf('%s\/', $webroot) => $v . '\/', sprintf(': %s', $webroot) => ': ' . $v, - sprintf('=%s', $webroot) => '=' . $v, sprintf('!%s', $webroot) => '!' . $v, sprintf('/\/%s\//', $webroot) => '/' . $v . '/', sprintf('/\'\/%s\'/', $webroot) => "'/" . $v . "'", ]); + File::replaceContentAsync(fn(string $content): string => preg_replace('/=' . preg_quote($webroot, '/') . '\b/', '=' . $v, $content) ?? $content); + rename($t . DIRECTORY_SEPARATOR . $webroot, $t . DIRECTORY_SEPARATOR . $v); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/.env b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/.env index e4cfe0813..2b371977c 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/.env +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/.env @@ -55,15 +55,6 @@ ################################################################################ # NOTIFICATIONS # -@@ -202,7 +207,7 @@ - # An email address to send notifications from. - # - # Applies to email notifications. --VORTEX_NOTIFY_EMAIL_FROM=webmaster@star-wars.com -+VORTEX_NOTIFY_EMAIL_FROM=docrootmaster@star-wars.com - - # Email address(es) to send notifications to. - # @@ -212,17 +217,3 @@ # with optional names in the format "email|name". # Example: "to1@example.com|Jane Doe, to2@example.com|John Doe" diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/.env b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/.env index dbdbb975e..d43b77eda 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/.env +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/.env @@ -55,15 +55,6 @@ ################################################################################ # NOTIFICATIONS # -@@ -202,7 +207,7 @@ - # An email address to send notifications from. - # - # Applies to email notifications. --VORTEX_NOTIFY_EMAIL_FROM=webmaster@star-wars.com -+VORTEX_NOTIFY_EMAIL_FROM=docrootmaster@star-wars.com - - # Email address(es) to send notifications to. - # @@ -212,17 +217,3 @@ # with optional names in the format "email|name". # Example: "to1@example.com|Jane Doe, to2@example.com|John Doe" diff --git a/.vortex/installer/tests/Unit/Handlers/ToolsHandlerDiscoveryTest.php b/.vortex/installer/tests/Unit/Handlers/ToolsHandlerDiscoveryTest.php index 08d51f11b..61fd64b53 100644 --- a/.vortex/installer/tests/Unit/Handlers/ToolsHandlerDiscoveryTest.php +++ b/.vortex/installer/tests/Unit/Handlers/ToolsHandlerDiscoveryTest.php @@ -140,14 +140,6 @@ function (AbstractHandlerDiscoveryTestCase $test, Config $config): void { $test->stubComposerJsonDependencies(['phpmd/phpmd' => '*'], TRUE); }, ]; - yield 'tools - discovery - phpmd, alt' => [ - [], - [Tools::id() => [Tools::PHPMD]] + $expected_installed, - function (AbstractHandlerDiscoveryTestCase $test, Config $config): void { - $test->stubVortexProject($config); - File::dump(static::$sut . '/phpmd.xml'); - }, - ]; yield 'tools - discovery - phpunit' => [ [], [Tools::id() => [Tools::PHPUNIT]] + $expected_installed,