Drop support for PHP 7.1 (#887)

This commit is contained in:
Zach Borboa
2024-08-21 21:40:39 -04:00
committed by GitHub
parent 50bb005686
commit d6ffbcfb44
12 changed files with 21 additions and 125 deletions
+1 -2
View File
@@ -15,7 +15,6 @@ jobs:
strategy:
matrix:
php-version:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
@@ -50,4 +49,4 @@ jobs:
- name: Static analysis
run: 'vendor/bin/psalm --config="tests/psalm.xml"'
if: ${{ !matrix.future-release && matrix.php-version >= 7.1 }}
if: ${{ !matrix.future-release }}
+1 -1
View File
@@ -37,7 +37,7 @@ Installation instructions to use the `composer` command can be found on https://
### Requirements
PHP Curl Class works with PHP 8.3, 8.2, 8.1, 8.0, 7.4, 7.3, 7.2, and 7.1.
PHP Curl Class works with PHP 8.3, 8.2, 8.1, 8.0, 7.4, 7.3, and 7.2.
### Quick Start and Examples
+1 -1
View File
@@ -18,7 +18,7 @@
}
],
"require": {
"php": ">=7.1",
"php": ">=7.2",
"ext-curl": "*"
},
"require-dev": {
+18 -24
View File
@@ -93,35 +93,29 @@ if [[ ! -z "${elses}" ]]; then
fi
# Run PHP_CodeSniffer.
if [[ "${CI_PHP_VERSION}" == "7.1" ]]; then :
# Determine which phpcs to use.
if [[ -f "vendor/bin/phpcs" ]]; then
phpcs_to_use="vendor/bin/phpcs"
else
phpcs_to_use="phpcs"
fi
# Determine which phpcs to use.
if [[ -f "vendor/bin/phpcs" ]]; then
phpcs_to_use="vendor/bin/phpcs"
else
phpcs_to_use="phpcs"
fi
# Detect coding standard violations.
"${phpcs_to_use}" --version
"${phpcs_to_use}" \
--extensions="php" \
--ignore="*/vendor/*" \
--standard="tests/ruleset.xml" \
-p \
-s \
.
if [[ "${?}" -ne 0 ]]; then
echo "Error: found PHP_CodeSniffer coding standard violation(s)"
errors+=("found PHP_CodeSniffer coding standard violation(s)")
fi
# Detect coding standard violations.
"${phpcs_to_use}" --version
"${phpcs_to_use}" \
--extensions="php" \
--ignore="*/vendor/*" \
--standard="tests/ruleset.xml" \
-p \
-s \
.
if [[ "${?}" -ne 0 ]]; then
echo "Error: found PHP_CodeSniffer coding standard violation(s)"
errors+=("found PHP_CodeSniffer coding standard violation(s)")
fi
# Run PHP-CS-Fixer.
if [[ "${CI_PHP_VERSION}" == "7.1" ]]; then :
elif [[ "${CI_PHP_VERSION}" == "7.2" ]]; then :
if [[ "${CI_PHP_VERSION}" == "7.2" ]]; then :
elif [[ "${CI_PHP_VERSION}" == "7.3" ]]; then :
else
vendor/bin/php-cs-fixer --version
-3
View File
@@ -1,3 +0,0 @@
# Build an image.
set -x
docker build --tag="php-curl-class/php71" .
-15
View File
@@ -1,15 +0,0 @@
# Run image to create container.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
set -x
cd "${SCRIPT_DIR}/../../.."
project_dir="${PWD}"
docker start "php71" ||
docker run \
--detach \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name="php71" \
--tty \
"php-curl-class/php71"
-17
View File
@@ -1,17 +0,0 @@
# Run tests inside container.
command=$(cat <<-END
mkdir --parents "/tmp/php-curl-class" &&
rsync --delete --exclude=".git" --exclude="vendor" --exclude="composer.lock" --links --recursive "/data/" "/tmp/php-curl-class/" &&
cd "/tmp/php-curl-class" &&
export CI_PHP_VERSION="7.1" &&
(
[ ! -f "/tmp/.composer_updated" ] &&
composer --no-interaction update &&
touch "/tmp/.composer_updated" ||
exit 0
) &&
bash "tests/run.sh"
END
)
set -x
docker exec --tty "php71" sh -c "${command}"
-3
View File
@@ -1,3 +0,0 @@
# Stop container.
set -x
docker stop "php71"
-19
View File
@@ -1,19 +0,0 @@
FROM php:7.1-cli
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get --assume-yes --quiet update
RUN apt-get --assume-yes --quiet install git && \
apt-get --assume-yes --quiet install libpng-dev && \
apt-get --assume-yes --quiet install rsync && \
apt-get --assume-yes --quiet install zip
RUN curl --silent --show-error "https://getcomposer.org/installer" | php && \
mv "composer.phar" "/usr/local/bin/composer" && \
composer global require --no-interaction "phpunit/phpunit"
RUN docker-php-ext-configure gd && \
docker-php-ext-install gd
ENV PATH /root/.composer/vendor/bin:$PATH
CMD ["bash"]
-3
View File
@@ -1,3 +0,0 @@
# Attach to running container.
docker exec --interactive --tty "php71" bash -l
-23
View File
@@ -1,23 +0,0 @@
bash "1_build.sh"
if [[ $? -ne 0 ]]; then
echo "Error: Build failed"
exit 1
fi
bash "2_start.sh"
if [[ $? -ne 0 ]]; then
echo "Error: Start failed"
exit 1
fi
bash "3_test.sh"
if [[ $? -ne 0 ]]; then
echo "Error: Test failed"
exit 1
fi
bash "4_stop.sh"
if [[ $? -ne 0 ]]; then
echo "Error: Stop failed"
exit 1
fi
@@ -1,14 +0,0 @@
# Run image to create container and attach to it.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
set -x
cd "${SCRIPT_DIR}/../../.."
project_dir="${PWD}"
docker run \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name="php71" \
--rm \
--tty \
"php-curl-class/php71" /bin/bash