diff --git a/php-cs/Dockerfile b/php-cs/Dockerfile index 5732020..78a9653 100644 --- a/php-cs/Dockerfile +++ b/php-cs/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4 +FROM php:8.0 RUN apt-get update -q && \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y \ diff --git a/php-cs/check-php-cs.sh b/php-cs/check-php-cs.sh index b3d2869..95882ac 100755 --- a/php-cs/check-php-cs.sh +++ b/php-cs/check-php-cs.sh @@ -2,10 +2,10 @@ # # Checks the PHP CS syntax # -if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then +if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi -./bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --diff --diff-format=udiff --dry-run --using-cache=no ${EXTRA_ARGS} +./bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix -v --diff --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS} diff --git a/php7.3/Dockerfile b/php7.3/Dockerfile index e3f39dd..86529fa 100644 --- a/php7.3/Dockerfile +++ b/php7.3/Dockerfile @@ -11,7 +11,8 @@ RUN set -ex; \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y php7.3-gd git curl openssl \ php7.3-cli php7.3-curl php7.3-mysql wget make \ php7.3-redis php7.3-intl php7.3-memcached php7.3-memcache php7.3-json \ - php7.3-apcu php7.3-xdebug php7.3-xml php7.3-zip php7.3-dev php7.3-mbstring; \ + php7.3-apcu php7.3-xdebug php7.3-xml php7.3-zip php7.3-dev php7.3-mbstring \ + zip unzip php7.3-zip; \ apt-get autoremove -y; apt-get autoclean; apt-get clean; \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; diff --git a/php7.4/Dockerfile b/php7.4/Dockerfile index b262dce..112aa05 100644 --- a/php7.4/Dockerfile +++ b/php7.4/Dockerfile @@ -11,7 +11,8 @@ RUN set -ex; \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y php7.4-gd git curl openssl \ php7.4-cli php7.4-curl php7.4-mysql wget make \ php7.4-redis php7.4-intl php7.4-memcached php7.4-memcache php7.4-json \ - php7.4-apcu php7.4-xdebug php7.4-xml php7.4-zip php7.4-dev php7.4-mbstring; \ + php7.4-apcu php7.4-xdebug php7.4-xml php7.4-zip php7.4-dev php7.4-mbstring \ + zip unzip php7.4-zip; \ apt-get autoremove -y; apt-get autoclean; apt-get clean; \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; diff --git a/php8.0/Dockerfile b/php8.0/Dockerfile index efa719c..b393cb3 100644 --- a/php8.0/Dockerfile +++ b/php8.0/Dockerfile @@ -11,7 +11,8 @@ RUN set -ex; \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y php8.0-gd git curl openssl \ php8.0-cli php8.0-curl php8.0-mysql wget make \ php8.0-redis php8.0-intl php8.0-memcached php8.0-memcache \ - php8.0-apcu php8.0-xdebug php8.0-xml php8.0-zip php8.0-dev php8.0-mbstring; \ + php8.0-apcu php8.0-xdebug php8.0-xml php8.0-zip php8.0-dev php8.0-mbstring \ + zip unzip php8.0-zip; \ apt-get autoremove -y; apt-get autoclean; apt-get clean; \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; diff --git a/php8.1/Dockerfile b/php8.1/Dockerfile index c2f5b37..f9e03c0 100644 --- a/php8.1/Dockerfile +++ b/php8.1/Dockerfile @@ -12,7 +12,8 @@ RUN set -ex; \ php8.1-cli php8.1-curl php8.1-mysql wget make \ php8.1-redis php8.1-intl php8.1-memcached php8.1-memcache \ php8.1-apcu php8.1-xdebug php8.1-xml php8.1-zip php8.1-dev php8.1-mbstring; \ - apt-get autoremove -y; apt-get autoclean; apt-get clean; \ + apt-get autoremove -y; apt-get autoclean; apt-get clean \ + zip unzip php8.1-zip; \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; RUN phpenmod curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype iconv intl diff --git a/php8.2/Dockerfile b/php8.2/Dockerfile index 6a1749c..3317c43 100644 --- a/php8.2/Dockerfile +++ b/php8.2/Dockerfile @@ -11,7 +11,8 @@ RUN set -ex; \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y php8.2-gd git curl openssl \ php8.2-cli php8.2-curl php8.2-mysql wget make \ php8.2-redis php8.2-intl php8.2-memcached php8.2-memcache \ - php8.2-apcu php8.2-xdebug php8.2-xml php8.2-zip php8.2-dev php8.2-mbstring; \ + php8.2-apcu php8.2-xdebug php8.2-xml php8.2-zip php8.2-dev php8.2-mbstring \ + zip unzip php8.2-zip; \ apt-get autoremove -y; apt-get autoclean; apt-get clean; \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; diff --git a/php8.3/Dockerfile b/php8.3/Dockerfile index b5d6821..a4cd2d4 100644 --- a/php8.3/Dockerfile +++ b/php8.3/Dockerfile @@ -11,7 +11,8 @@ RUN set -ex; \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y php8.3-gd git curl openssl \ php8.3-cli php8.3-curl php8.3-mysql wget make \ php8.3-redis php8.3-intl php8.3-memcached php8.3-memcache \ - php8.3-apcu php8.3-xdebug php8.3-xml php8.3-zip php8.3-dev php8.3-mbstring; \ + php8.3-apcu php8.3-xdebug php8.3-xml php8.3-zip php8.3-dev php8.3-mbstring \ + zip unzip php8.3-zip; \ apt-get autoremove -y; apt-get autoclean; apt-get clean; \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; diff --git a/php8.4/Dockerfile b/php8.4/Dockerfile new file mode 100644 index 0000000..228e433 --- /dev/null +++ b/php8.4/Dockerfile @@ -0,0 +1,31 @@ +FROM debian:bookworm + +# install the PHP extensions we need +# see https://friendi.ca/resources/requirements/ +RUN set -ex; \ + apt-get update; \ + DEBIAN_FRONTEND=noninteractive apt-get install -q -y wget gnupg2 apt-transport-https lsb-release ca-certificates mariadb-client; \ + wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; \ + echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list; \ + apt-get update; \ + DEBIAN_FRONTEND=noninteractive apt-get install -q -y php8.4-gd git curl openssl \ + php8.4-cli php8.4-curl php8.4-mysql wget make \ + php8.4-redis php8.4-intl php8.4-memcached php8.4-memcache \ + php8.4-apcu php8.4-xdebug php8.4-xml php8.4-zip php8.4-dev php8.4-mbstring \ + zip unzip php8.4-zip; \ + apt-get autoremove -y; apt-get autoclean; apt-get clean; \ + rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; + +RUN phpenmod curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype iconv intl + +RUN set -ex; \ + curl -O -L https://phar.phpunit.de/phpunit-9.phar; \ + chmod +x phpunit-9.phar; \ + mv phpunit-9.phar /usr/local/bin/phpunit; +RUN set -ex; \ + curl -O -L https://getcomposer.org/download/1.10.15/composer.phar; \ + chmod +x composer.phar; \ + mv composer.phar /usr/local/bin/composer; + +RUN phpdismod xdebug +ADD php.ini /etc/php/8.4/cli/conf.d/friendica.ini diff --git a/php8.4/php.ini b/php8.4/php.ini new file mode 100644 index 0000000..0c9a2b2 --- /dev/null +++ b/php8.4/php.ini @@ -0,0 +1,17 @@ +memory_limit = 768M +phar.readonly = 0 ; only for building phar files on CI - should be disabled on production environments +; Opcache +opcache.enable=1 +opcache.enable_cli=1 +opcache.interned_strings_buffer=8 +opcache.max_accelerated_files=10000 +opcache.memory_consumption=128 +opcache.save_comments=1 +opcache.revalidate_freq=1 +apc.enabled=1 +apc.enable_cli=1 +error_reporting=-1 +log_errors_max_len=0 +zend.assertions=1 +assert.exception=1 +xdebug.show_exception_trace=0