Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Commit 552de24

Browse files
committed
Fix: Skip composer install if composer.json doesn't exist
This allows the Docker image to be tested standalone with --version without requiring a composer.json file to be present. Fixes the Docker build test that runs the container without a project context.
1 parent 5805945 commit 552de24

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

entrypoint.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ if [ "${REQUIRE_DEV}" != "true" ]; then
1717
COMPOSER_FLAGS="${COMPOSER_FLAGS} --no-dev"
1818
fi
1919

20-
# Install project dependencies
21-
echo "::group::Installing project dependencies"
22-
# shellcheck disable=SC2086
23-
composer install ${COMPOSER_FLAGS}
24-
echo "::endgroup::"
20+
# Install project dependencies if composer.json exists
21+
if [ -f "composer.json" ]; then
22+
echo "::group::Installing project dependencies"
23+
# shellcheck disable=SC2086
24+
composer install ${COMPOSER_FLAGS}
25+
echo "::endgroup::"
26+
else
27+
echo "::notice::No composer.json found, skipping dependency installation"
28+
fi
2529

2630
# Build PHPArkitect flags
2731
PHPARKITECT_FLAGS=""

0 commit comments

Comments
 (0)