Skip to content

Commit

Permalink
Merge pull request #57 from weierophinney/feature/php-8.1-support
Browse files Browse the repository at this point in the history
Provide PHP 8.1 support
  • Loading branch information
Ocramius authored Sep 10, 2021
2 parents b424a14 + 3fded87 commit e1f3420
Show file tree
Hide file tree
Showing 220 changed files with 5,440 additions and 2,703 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/.phpcs-cache
/.phpunit.result.cache
/clover.xml
/composer.lock
/coveralls-upload.json
/docs/html/
/laminas-mkdoc-theme.tgz
/laminas-mkdoc-theme/
/phpunit.xml
/vendor/
/.phpunit.result.cache
5 changes: 5 additions & 0 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ignore_php_platform_requirements": {
"8.1": true
}
}
18 changes: 13 additions & 5 deletions .laminas-ci/pre-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,25 @@ cp .laminas-ci/phpunit.xml phpunit.xml

# Install dependendies
apt update -qq
apt install -y apache2 php${PHP_VERSION}-fpm
# Hack because apache2 package attempts to write to 000-default.conf twice
apt-get install -o Dpkg::Options::="--force-confnew" -y apache2
if [[ "${PHP_VERSION}" == "8.1" ]];then
# This might not be necessary
# switch_sapi -v 8.1 -s fpm:apache
echo "Skipping FPM installation on PHP 8.1"
else
apt install -y "php${PHP_VERSION}-fpm"
fi

# Enable required modules
a2enmod rewrite actions proxy_fcgi setenvif alias
a2enconf php${PHP_VERSION}-fpm
a2enconf "php${PHP_VERSION}-fpm"

# Setup and start php-fpm
echo "cgi.fix_pathinfo = 1" >> /etc/php/${PHP_VERSION}/fpm/php.ini
sed -i -e "s,www-data,${TEST_USER},g" /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf
echo "cgi.fix_pathinfo = 1" >> "/etc/php/${PHP_VERSION}/fpm/php.ini"
sed -i -e "s,www-data,${TEST_USER},g" "/etc/php/${PHP_VERSION}/fpm/pool.d/www.conf"
sed -i -e "s,www-data,${TEST_USER},g" /etc/apache2/envvars
service php${PHP_VERSION}-fpm start
service "php${PHP_VERSION}-fpm" start

# configure apache virtual hosts
echo "ServerName 127.0.0.1" >> /etc/apache2/apache2.conf
Expand Down
20 changes: 9 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@
"sort-packages": true
},
"require": {
"php": "^7.3 || ~8.0.0",
"laminas/laminas-loader": "^2.5.1",
"laminas/laminas-stdlib": "^3.2.1",
"laminas/laminas-uri": "^2.5.2",
"laminas/laminas-validator": "^2.10.1",
"laminas/laminas-zendframework-bridge": "^1.0"
"php": "^7.3 || ~8.0.0 || ~8.1.0",
"laminas/laminas-loader": "^2.8",
"laminas/laminas-stdlib": "^3.6",
"laminas/laminas-uri": "^2.9.1",
"laminas/laminas-validator": "^2.15"
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"laminas/laminas-config": "^3.1 || ^2.6",
"phpunit/phpunit": "^9.3"
"laminas/laminas-coding-standard": "~2.2.1",
"phpunit/phpunit": "^9.5.5"
},
"suggest": {
"paragonie/certainty": "For automated management of cacert.pem"
Expand All @@ -55,7 +53,7 @@
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
},
"replace": {
"zendframework/zend-http": "^2.11.2"
"conflict": {
"zendframework/zend-http": "*"
}
}
Loading

0 comments on commit e1f3420

Please sign in to comment.