From 6857e578de5971b2abb574873c6049b384fce6fc Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Mon, 23 Jun 2025 13:26:51 -0400 Subject: [PATCH 1/2] use `cp` instead of `git clone` --- src/Test/MakerTestEnvironment.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Test/MakerTestEnvironment.php b/src/Test/MakerTestEnvironment.php index f7af580ff..d3b80a302 100644 --- a/src/Test/MakerTestEnvironment.php +++ b/src/Test/MakerTestEnvironment.php @@ -145,7 +145,7 @@ public function prepareDirectory(): void try { // let's do some magic here git is faster than copy MakerTestProcess::create( - '\\' === \DIRECTORY_SEPARATOR ? 'git clone %FLEX_PATH% %APP_PATH%' : 'git clone "$FLEX_PATH" "$APP_PATH"', + '\\' === \DIRECTORY_SEPARATOR ? 'cp -R %FLEX_PATH% %APP_PATH%' : 'cp -R "$FLEX_PATH" "$APP_PATH"', \dirname($this->flexPath), [ 'FLEX_PATH' => $this->flexPath, @@ -283,7 +283,7 @@ private function buildFlexSkeleton(): void 'replace' => '', ], ]; - $this->processReplacements($replacements, $this->flexPath); + $this->processReplacements($replacements, $this->flexPath, allowNotFound: true); // end of temp code file_put_contents($this->flexPath.'/.gitignore', "var/cache/\n"); @@ -294,10 +294,10 @@ private function buildFlexSkeleton(): void )->run(); } - private function processReplacements(array $replacements, string $rootDir): void + private function processReplacements(array $replacements, string $rootDir, bool $allowNotFound = false): void { foreach ($replacements as $replacement) { - $this->processReplacement($rootDir, $replacement['filename'], $replacement['find'], $replacement['replace']); + $this->processReplacement($rootDir, $replacement['filename'], $replacement['find'], $replacement['replace'], $allowNotFound); } } From e147694332784610ef7339781abe2f3052f9ca2a Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Mon, 23 Jun 2025 14:34:17 -0400 Subject: [PATCH 2/2] force phpunit 9 for now --- src/Test/MakerTestEnvironment.php | 2 +- src/Test/MakerTestRunner.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Test/MakerTestEnvironment.php b/src/Test/MakerTestEnvironment.php index d3b80a302..ad3d72e25 100644 --- a/src/Test/MakerTestEnvironment.php +++ b/src/Test/MakerTestEnvironment.php @@ -260,7 +260,7 @@ private function buildFlexSkeleton(): void } // fetch a few packages needed for testing - MakerTestProcess::create('composer require phpunit browser-kit symfony/css-selector --prefer-dist --no-progress --no-suggest', $this->flexPath) + MakerTestProcess::create('composer require phpunit/phpunit:"^9.6" phpunit-bridge browser-kit symfony/css-selector --prefer-dist --no-progress --no-suggest', $this->flexPath) ->run(); if ('\\' !== \DIRECTORY_SEPARATOR) { diff --git a/src/Test/MakerTestRunner.php b/src/Test/MakerTestRunner.php index 4e6287437..eaaa3327c 100644 --- a/src/Test/MakerTestRunner.php +++ b/src/Test/MakerTestRunner.php @@ -207,7 +207,7 @@ public function updateSchema(): void public function runTests(): void { $internalTestProcess = MakerTestProcess::create( - \sprintf('php %s', $this->getPath('bin/phpunit')), + \sprintf('php %s', $this->getPath('vendor/bin/phpunit')), $this->environment->getPath()) ->run(true) ;