Skip to content
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

Use APCu as Composer level 2 optimisation strategy #795

Open
wants to merge 2 commits into
base: develop
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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"require": {
"php": "^8.0",
"ext-PDO": "*",
"ext-apcu": "*",
"ext-json": "*",
"ext-sockets": "*",
"colinmollenhour/credis": "^1.6.0 || ^1.13",
Expand Down
2 changes: 1 addition & 1 deletion src/Step/Build/ComposerDumpAutoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function execute()

return;
}
$this->shell->execute('composer dump-autoload -o --ansi --no-interaction');
$this->shell->execute('composer dump-autoload --optimize --apcu --ansi --no-interaction');
} catch (ConfigException $e) {
throw new StepException($e->getMessage(), $e->getCode(), $e);
} catch (ShellException $e) {
Expand Down
4 changes: 2 additions & 2 deletions src/Test/Unit/Step/Build/ComposerDumpAutoloadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function testExecute(): void
->willReturn(false);
$this->shellMock->expects($this->once())
->method('execute')
->with('composer dump-autoload -o --ansi --no-interaction');
->with('composer dump-autoload --optimize --apcu --ansi --no-interaction');

$this->step->execute();
}
Expand Down Expand Up @@ -106,7 +106,7 @@ public function testExecuteWithException(): void

$this->shellMock->expects($this->once())
->method('execute')
->with('composer dump-autoload -o --ansi --no-interaction')
->with('composer dump-autoload --optimize --apcu --ansi --no-interaction')
->willThrowException(new ShellException('something went wrong'));

$this->step->execute();
Expand Down