File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [ -f " composer.json" ]; then
4+ echo " Found composer.json in project root. Installing dependencies..."
5+ composer install --no-interaction --ignore-platform-reqs
6+ echo " ✅ PHP dependencies installed successfully in project root."
7+ else
8+ echo " ⚠️ No composer.json in project root. Searching for composer.json files in subdirectories..."
9+
10+ find . -type f -name " composer.json" | while read composer_file; do
11+ dir=$( dirname " $composer_file " )
12+ echo " Installing dependencies in $dir ..."
13+ (cd " $dir " && composer install --no-interaction --ignore-platform-reqs)
14+ if [ $? -eq 0 ]; then
15+ echo " ✅ Dependencies installed successfully in $dir ."
16+ else
17+ echo " ❌ Failed to install dependencies in $dir ."
18+ fi
19+ done
20+ fi
You can’t perform that action at this time.
0 commit comments