Skip to content

CI updates/fixes #1715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Test/MakerTestEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand All @@ -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");
Expand All @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Test/MakerTestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
;
Expand Down
Loading