Skip to content
Merged
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
24 changes: 24 additions & 0 deletions .claude/hooks/SessionStart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,30 @@ pre-commit install --hook-type commit-msg

echo "Pre-commit hooks installed successfully!"

# Check if pecl is available, install php-pear if not
echo "Checking for pecl..."
if ! command -v pecl &> /dev/null; then
echo "pecl is not installed. Installing php-pear..."

# Try to install php-pear using apt
if command -v apt-get &> /dev/null; then
apt-get update && apt-get install -y php-pear
else
echo "Error: apt package manager is not available. Cannot install php-pear."
exit 1
fi

# Verify installation
if ! command -v pecl &> /dev/null; then
echo "Error: Failed to install php-pear/pecl."
exit 1
fi

echo "php-pear and pecl installed successfully!"
else
echo "pecl is already available."
fi

pecl install xdebug || true

composer install