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

fix: Migrate from amphp/parallel-functions to amphp/parallel #1216

Merged
merged 10 commits into from
Nov 27, 2023
Merged
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
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -487,18 +487,19 @@ $(REQUIREMENT_CHECKER_EXTRACT):

$(SCOPED_BOX_BIN): $(SCOPED_BOX_DEPS)
@echo "$(YELLOW_COLOR)Compile Box.$(NO_COLOR)"
$(BOX) compile --ansi --no-parallel
@# Use parallelization
$(BOX) compile --ansi

rm $(TMP_SCOPED_BOX_BIN) || true
mv -v bin/box.phar $(TMP_SCOPED_BOX_BIN)

@echo "$(YELLOW_COLOR)Compile Box with the isolated Box PHAR.$(NO_COLOR)"
php $(TMP_SCOPED_BOX_BIN) compile --ansi --no-parallel
php $(TMP_SCOPED_BOX_BIN) compile --ansi

mv -fv bin/box.phar box

@echo "$(YELLOW_COLOR)Test the PHAR which has been created by the isolated PHAR.$(NO_COLOR)"
./box compile --ansi --no-parallel
./box compile --ansi

mv -fv box bin/box.phar
rm $(TMP_SCOPED_BOX_BIN)
Expand Down
5 changes: 3 additions & 2 deletions bin/bench-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

if ($parallelTime <= $maxParallelTimeTarget) {
echo 'OK.'.PHP_EOL;

exit(0);
}

Expand All @@ -59,5 +60,5 @@

echo 'Failed!'.PHP_EOL;
echo 'Missed the target by '.$relativeDifference.'%'.PHP_EOL;
// TODO: https://github.com/box-project/box/issues/552
exit(0);

exit(1);
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ext-mbstring": "*",
"ext-phar": "*",
"composer-plugin-api": "^2.2",
"amphp/parallel-functions": "^1.1",
"amphp/parallel": "^2.0",
"composer/semver": "^3.3.2",
"composer/xdebug-handler": "^3.0.3",
"fidry/console": "^0.6.0",
Expand Down
Loading