Skip to content

Commit

Permalink
Merge branch 'main' into markhallen/add-bun-package-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
thavaahariharangit authored Jan 13, 2025
2 parents eaa6f42 + f98630a commit cc5ad1e
Show file tree
Hide file tree
Showing 17 changed files with 4,511 additions and 1,158 deletions.
52 changes: 25 additions & 27 deletions composer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,31 @@ RUN apt-get update \
RUN add-apt-repository ppa:ondrej/php \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
php7.4 \
php7.4-apcu \
php7.4-bcmath \
php7.4-cli \
php7.4-common \
php7.4-curl \
php7.4-gd \
php7.4-geoip \
php7.4-gettext \
php7.4-gmp \
php7.4-imagick \
php7.4-imap \
php7.4-intl \
php7.4-json \
php7.4-ldap \
php7.4-mbstring \
php7.4-memcached \
php7.4-mongodb \
php7.4-mysql \
php7.4-redis \
php7.4-soap \
php7.4-sqlite3 \
php7.4-tidy \
php7.4-xml \
php7.4-zip \
php7.4-zmq \
php7.4-mcrypt \
php8.2 \
php8.2-apcu \
php8.2-bcmath \
php8.2-cli \
php8.2-common \
php8.2-curl \
php8.2-gd \
php8.2-gettext \
php8.2-gmp \
php8.2-imagick \
php8.2-imap \
php8.2-intl \
php8.2-ldap \
php8.2-mbstring \
php8.2-memcached \
php8.2-mongodb \
php8.2-mysql \
php8.2-redis \
php8.2-soap \
php8.2-sqlite3 \
php8.2-tidy \
php8.2-xml \
php8.2-zip \
php8.2-zmq \
php8.2-mcrypt \
&& rm -rf /var/lib/apt/lists/*

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_V2_VERSION}
Expand Down
34 changes: 34 additions & 0 deletions composer/helpers/v1/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

set -e

if [ -z "$DEPENDABOT_NATIVE_HELPERS_PATH" ]; then
echo "Unable to build, DEPENDABOT_NATIVE_HELPERS_PATH is not set"
exit 1
fi

install_dir="$DEPENDABOT_NATIVE_HELPERS_PATH/composer/v1"
mkdir -p "$install_dir"

helpers_dir="$(dirname "${BASH_SOURCE[0]}")"
cp -r \
"$helpers_dir/bin" \
"$helpers_dir/src" \
"$helpers_dir/.php-cs-fixer.dist.php" \
"$helpers_dir/composer.json" \
"$helpers_dir/composer.lock" \
"$helpers_dir/phpstan.dist.neon" \
"$install_dir"

cd "$install_dir"

composer1 validate --no-check-publish
composer1 install
# php-cs-fixer 3.15 added support for PHP 8.2, but also requires composer/semver ^3.3, which conflicts with composer1.
# So the older version of php-cs-fixer errors that it doesn't know about PHP 8.2 syntax which breaks the build.
# So PHP_CS_FIXER_IGNORE_ENV disables that error until we get around to deprecating composer 1 support.
PHP_CS_FIXER_IGNORE_ENV=true composer1 run lint -- --dry-run
composer1 run stan

# Composer caches source zips and repo metadata, none of which is useful. Save space in this layer
rm -Rf ~/.composer/cache
26 changes: 26 additions & 0 deletions composer/helpers/v1/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "dependabot/composer-v1-helper",
"description": "A helper package for Dependabot to perform updates using Composer",
"license": "The Prosperity Public License 2.0.0",
"require": {
"php": "^8.2",
"ext-json": "*",
"composer/composer": "^1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.9",
"phpstan/phpstan": "~1.10.3"
},
"autoload": {
"psr-4": {
"Dependabot\\Composer\\": "src/"
}
},
"scripts": {
"lint": "php-cs-fixer fix --diff --verbose",
"stan": "phpstan analyse"
},
"config": {
"sort-packages": true
}
}
Loading

0 comments on commit cc5ad1e

Please sign in to comment.