Skip to content

Commit 9079495

Browse files
committed
feat: Increase process timeouts
1 parent cb5daaa commit 9079495

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Command/NewCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function __invoke(): int
126126

127127
if (!$isProject && is_file($absoluteCoreDirectory . DIRECTORY_SEPARATOR . 'setupproject.php')) {
128128
$this->info('Setting up project ...');
129-
$setupProcess = new Process(['php', '-f', 'setupproject.php', 'skip-frontend-build'], $coreDirectory);
129+
$setupProcess = new Process(['php', '-f', 'setupproject.php', 'skip-frontend-build'], $coreDirectory, timeout: 3600);
130130
$setupProcess->run();
131131
if (!$setupProcess->isSuccessful()) {
132132
$this->error('An error occurred while setting up the project.');
@@ -160,7 +160,7 @@ public function __invoke(): int
160160
}
161161

162162
if ($isProject) {
163-
$composerInstall = new Process(['composer', 'install'], $directory . DIRECTORY_SEPARATOR . 'project');
163+
$composerInstall = new Process(['composer', 'install'], $directory . DIRECTORY_SEPARATOR . 'project', timeout: 3600);
164164
$composerInstall->run();
165165
$composerInstalled = $composerInstall->isSuccessful();
166166
if (!$composerInstalled) {

src/Service/Frontend.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static function build(ArtemeonStyle $output, string $coreDirectory): void
1616
if ($detectPnpm->isSuccessful()) {
1717
$buildFilesDirectory = $coreDirectory . DIRECTORY_SEPARATOR . '_buildfiles';
1818
$output->info('Installing front-end dependencies ...');
19-
$pnpmInstall = new Process(['pnpm', 'install'], $buildFilesDirectory);
19+
$pnpmInstall = new Process(['pnpm', 'install'], $buildFilesDirectory, timeout: 3600);
2020
$pnpmInstall->run();
2121
if (!$pnpmInstall->isSuccessful()) {
2222
$output->error('An error occurred while installing dependencies.');
@@ -27,7 +27,7 @@ public static function build(ArtemeonStyle $output, string $coreDirectory): void
2727
}
2828

2929
$output->info('Building front-end assets ...');
30-
$pnpmRunDev = new Process(['pnpm', 'dev'], $buildFilesDirectory);
30+
$pnpmRunDev = new Process(['pnpm', 'dev'], $buildFilesDirectory, timeout: 3600);
3131
$pnpmRunDev->run();
3232
if (!$pnpmRunDev->isSuccessful()) {
3333
$output->error('An error occurred while building the front-end assets.');

src/Service/Valet.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static function setup(ArtemeonStyle $output, string $directory, string $c
3636
}
3737

3838
$branch = (int) $majorVersion >= 4 ? 'v4' : 'main';
39-
$cloneAgpValetDriver = new Process(['git', 'clone', '-b', $branch, 'https://github.com/artemeon/agp-valet-driver.git'], $valetDriversDirectory);
39+
$cloneAgpValetDriver = new Process(['git', 'clone', '-b', $branch, 'https://github.com/artemeon/agp-valet-driver.git'], $valetDriversDirectory, timeout: 3600);
4040
$cloneAgpValetDriver->run();
4141
}
4242

tests/NewCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class NewCommandTest extends TestCase
1313
{
14-
public function testItCanScaffoldANewAgpApp()
14+
public function testItCanScaffoldANewAgpApp(): void
1515
{
1616
$scaffoldDirectoryName = 'my-app';
1717
$scaffoldDirectory = __DIR__ . '/../' . $scaffoldDirectoryName;

0 commit comments

Comments
 (0)