Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove php:<8.0 support, effectively removing all binaries and extensions from the container #150

Merged
Show file tree
Hide file tree
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
96 changes: 0 additions & 96 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,102 +78,6 @@ RUN apt update \
\
php-pear \
\
php5.6-bz2 \
php5.6-cli \
php5.6-curl \
php5.6-dev \
php5.6-fileinfo \
php5.6-intl \
php5.6-json \
php5.6-mbstring \
php5.6-phar \
php5.6-phpdbg \
php5.6-readline \
php5.6-sockets \
php5.6-xml \
php5.6-xsl \
php5.6-zip \
\
php7.0-cli \
php7.0-bz2 \
php7.0-curl \
php7.0-dev \
php7.0-fileinfo \
php7.0-intl \
php7.0-json \
php7.0-mbstring \
php7.0-phar \
php7.0-phpdbg \
php7.0-readline \
php7.0-sockets \
php7.0-xml \
php7.0-xsl \
php7.0-zip \
\
php7.1-cli \
php7.1-bz2 \
php7.1-curl \
php7.1-dev \
php7.1-fileinfo \
php7.1-intl \
php7.1-json \
php7.1-mbstring \
php7.1-pcov \
php7.1-phar \
php7.1-readline \
php7.1-sockets \
php7.1-xml \
php7.1-xsl \
php7.1-zip \
\
php7.2-cli \
php7.2-bz2 \
php7.2-curl \
php7.2-dev \
php7.2-fileinfo \
php7.2-intl \
php7.2-json \
php7.2-mbstring \
php7.2-pcov \
php7.2-phar \
php7.2-readline \
php7.2-sockets \
php7.2-xml \
php7.2-xsl \
php7.2-zip \
\
php7.3-cli \
php7.3-bz2 \
php7.3-curl \
php7.3-dev \
php7.3-fileinfo \
php7.3-intl \
php7.3-json \
php7.3-mbstring \
php7.3-pcov \
php7.3-phar \
php7.3-readline \
php7.3-sockets \
php7.3-xml \
php7.3-xsl \
php7.3-zip \
\
php7.4-cli \
php7.4-bz2 \
php7.4-curl \
php7.4-dev \
php7.4-fileinfo \
php7.4-intl \
php7.4-json \
php7.4-mbstring \
php7.4-pcov \
php7.4-phar \
php7.4-readline \
php7.4-sockets \
php7.4-xml \
php7.4-xsl \
php7.4-zip \
\
php8.0-cli \
php8.0-bz2 \
php8.0-curl \
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ The tricks to remember are:
- You need to set the container WORKDIR to that volume.
- You need to provide the job JSON.

As an example, if you wanted to run the CS checks under PHP 7.4 using locked dependencies, you could do something like the following:
As an example, if you wanted to run the CS checks under PHP 8.2 using locked dependencies, you could do something like the following:

```bash
$ docker run -v $(realpath .):/github/workspace -w=/github/workspace laminas-check-runner:latest '{"php":"7.4","dependencies":"locked","extensions":[],"ini":["memory_limit=-1"],"command":"./vendor/bin/phpcs"}'
$ docker run -v $(realpath .):/github/workspace -w=/github/workspace laminas-check-runner:latest '{"php":"8.2","dependencies":"locked","extensions":[],"ini":["memory_limit=-1"],"command":"./vendor/bin/phpcs"}'
```

The trick to remember: the job JSON should generally be in single quotes, to allow the `"` characters used to delimit properties and strings in the JSON to not cause interpolation issues.
Expand All @@ -225,12 +225,6 @@ The trick to remember: the job JSON should generally be in single quotes, to all

The container the action provides and consumes builds off the ubuntu:focal image, installs the [Sury PHP repository](https://deb.sury.org/), and installs PHP versions:

- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
Expand All @@ -250,7 +244,7 @@ Each provides the following extensions by default:
- xsl
- zip

You may specify other extensions to install during a job by selecting them from the list of packages in the Sury repository, and dropping the `php{VERSION}` prefix; e.g., the package "php7.4-tidy" provides the "tidy" extension, so you would only specify "tidy" if you want to include that extension for your build.
You may specify other extensions to install during a job by selecting them from the list of packages in the Sury repository, and dropping the `php{VERSION}` prefix; e.g., the package "php8.2-tidy" provides the "tidy" extension, so you would only specify "tidy" if you want to include that extension for your build.

We also provide the following extensions:

Expand Down
8 changes: 1 addition & 7 deletions mods-install/install_sqlsrv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@ set -e
cd tmp

# Download extension versions from MS
curl -L https://github.com/microsoft/msphpsql/releases/download/v5.9.0/Ubuntu2004-7.3.tar | tar xf - --strip-components=1 Ubuntu2004-7.3/php_pdo_sqlsrv_73_nts.so Ubuntu2004-7.3/php_sqlsrv_73_nts.so
curl -L https://github.com/microsoft/msphpsql/releases/download/v5.10.0/Ubuntu2004-7.4.tar | tar xf - --strip-components=1 Ubuntu2004-7.4/php_pdo_sqlsrv_74_nts.so Ubuntu2004-7.4/php_sqlsrv_74_nts.so
curl -L https://github.com/microsoft/msphpsql/releases/download/v5.10.0/Ubuntu2004-8.0.tar | tar xf - --strip-components=1 Ubuntu2004-8.0/php_pdo_sqlsrv_80_nts.so Ubuntu2004-8.0/php_sqlsrv_80_nts.so
curl -L https://github.com/microsoft/msphpsql/releases/download/v5.10.0/Ubuntu2004-8.1.tar | tar xf - --strip-components=1 Ubuntu2004-8.1/php_pdo_sqlsrv_81_nts.so Ubuntu2004-8.1/php_sqlsrv_81_nts.so

# Copy extensions to appropriate locations for each PHP version
mv php_pdo_sqlsrv_73_nts.so "$(php7.3 -i | grep -P '^extension_dir' | sed -E -e 's/^extension_dir\s+=>\s+\S+\s+=>\s+(.*)$/\1/')/pdo_sqlsrv.so"
mv php_sqlsrv_73_nts.so "$(php7.3 -i | grep -P '^extension_dir' | sed -E -e 's/^extension_dir\s+=>\s+\S+\s+=>\s+(.*)$/\1/')/sqlsrv.so"
mv php_pdo_sqlsrv_74_nts.so "$(php7.4 -i | grep -P '^extension_dir' | sed -E -e 's/^extension_dir\s+=>\s+\S+\s+=>\s+(.*)$/\1/')/pdo_sqlsrv.so"
mv php_sqlsrv_74_nts.so "$(php7.4 -i | grep -P '^extension_dir' | sed -E -e 's/^extension_dir\s+=>\s+\S+\s+=>\s+(.*)$/\1/')/sqlsrv.so"
mv php_pdo_sqlsrv_80_nts.so "$(php8.0 -i | grep -P '^extension_dir' | sed -E -e 's/^extension_dir\s+=>\s+\S+\s+=>\s+(.*)$/\1/')/pdo_sqlsrv.so"
mv php_sqlsrv_80_nts.so "$(php8.0 -i | grep -P '^extension_dir' | sed -E -e 's/^extension_dir\s+=>\s+\S+\s+=>\s+(.*)$/\1/')/sqlsrv.so"
mv php_pdo_sqlsrv_81_nts.so "$(php8.1 -i | grep -P '^extension_dir' | sed -E -e 's/^extension_dir\s+=>\s+\S+\s+=>\s+(.*)$/\1/')/pdo_sqlsrv.so"
mv php_sqlsrv_81_nts.so "$(php8.1 -i | grep -P '^extension_dir' | sed -E -e 's/^extension_dir\s+=>\s+\S+\s+=>\s+(.*)$/\1/')/sqlsrv.so"

# Copy conf file to appropriate locations
for PHP_VERSION in 7.3 7.4 8.0 8.1;do
for PHP_VERSION in 8.0 8.1;do
cp /mods-available/sqlsrv.ini "/etc/php/${PHP_VERSION}/mods-available/sqlsrv.ini"
done
2 changes: 1 addition & 1 deletion scripts/php_ini_dev_settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SUBSTITUTIONS+=('s/mysqlnd.collect_memory_statistics ?= ?(On|Off)/mysqlnd.collec
SUBSTITUTIONS+=('s/zend.assertions ?= ?(-1|1)/zend.assertions = 1/')
SUBSTITUTIONS+=('s/opcache.huge_code_pages ?= ?(0|1)/opcache.huge_code_pages = 0/')

for PHP_VERSION in 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2;do
for PHP_VERSION in 8.0 8.1 8.2;do
INI_FILE="/etc/php/${PHP_VERSION}/cli/php.ini"
for SUBSTITUTION in "${SUBSTITUTIONS[@]}";do
sed --in-place -E -e "${SUBSTITUTION}" "${INI_FILE}"
Expand Down