Skip to content

Commit

Permalink
Merge pull request #63 from fezfez/php8.2
Browse files Browse the repository at this point in the history
Drop support php 7, add php 8.2 support
  • Loading branch information
Ocramius authored Nov 15, 2022
2 parents 2a20b63 + a21c83d commit d449859
Show file tree
Hide file tree
Showing 12 changed files with 320 additions and 657 deletions.
5 changes: 4 additions & 1 deletion .laminas-ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"mongodb",
"mysql",
"pgsql"
]
],
"ignore_php_platform_requirements": {
"8.2": true
}
}
14 changes: 14 additions & 0 deletions .laminas-ci/install-mongodb-extension-via-pecl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

PHP_VERSION="$1"

if ! [[ "${PHP_VERSION}" =~ 8\.2 ]]; then
echo "mongodb is only installed from pecl for PHP 8.2, ${PHP_VERSION} detected."
exit 0;
fi

set +e

pecl install mongodb
echo "extension=mongodb.so" > /etc/php/${PHP_VERSION}/mods-available/mongodb.ini
phpenmod -v ${PHP} -s cli mongodb
19 changes: 19 additions & 0 deletions .laminas-ci/pre-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

WORKING_DIRECTORY=$2
JOB=$3
PHP_VERSION=$(echo "${JOB}" | jq -r '.php')


if [ ! -z "$GITHUB_BASE_REF" ] && [[ "$GITHUB_BASE_REF" =~ ^[0-9]+\.[0-9] ]]; then
readarray -td. TARGET_BRANCH_VERSION_PARTS <<<"${GITHUB_BASE_REF}.";
unset 'TARGET_BRANCH_VERSION_PARTS[-1]';
declare -a TARGET_BRANCH_VERSION_PARTS
MAJOR_OF_TARGET_BRANCH=${TARGET_BRANCH_VERSION_PARTS[0]}
MINOR_OF_TARGET_BRANCH=${TARGET_BRANCH_VERSION_PARTS[1]}

export COMPOSER_ROOT_VERISON="${MAJOR_OF_TARGET_BRANCH}.${MINOR_OF_TARGET_BRANCH}.99"
echo "Exported COMPOSER_ROOT_VERISON as ${COMPOSER_ROOT_VERISON}"
fi

${WORKING_DIRECTORY}/.laminas-ci/install-mongodb-extension-via-pecl.sh "${PHP_VERSION}" || exit 1
22 changes: 10 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"config": {
"sort-packages": true,
"platform": {
"php": "7.4.99"
"php": "8.0.99"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
Expand All @@ -32,24 +32,22 @@
}
},
"require": {
"php": "^7.4 || ~8.0.0 || ~8.1.0",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"laminas/laminas-eventmanager": "^3.5",
"laminas/laminas-servicemanager": "^3.15.1",
"laminas/laminas-stdlib": "^3.10.1"
},
"require-dev": {
"laminas/laminas-cache": "^3.1.3",
"laminas/laminas-cache-storage-adapter-memory": "^2.0.0",
"laminas/laminas-cache": "^3.8",
"laminas/laminas-cache-storage-adapter-memory": "^2.2",
"laminas/laminas-coding-standard": "~2.4.0",
"laminas/laminas-db": "^2.13.4",
"laminas/laminas-http": "^2.15",
"laminas/laminas-validator": "^2.15",
"mongodb/mongodb": "~1.13.1",
"php-mock/php-mock-phpunit": "^1.1.2 || ^2.0",
"phpspec/prophecy-phpunit": "^2.0.1",
"laminas/laminas-db": "^2.15",
"laminas/laminas-http": "^2.17.1",
"laminas/laminas-validator": "^2.28",
"mongodb/mongodb": "~1.13.0",
"phpunit/phpunit": "^9.5.26",
"psalm/plugin-phpunit": "^0.18.0",
"vimeo/psalm": "^4.29.0"
"psalm/plugin-phpunit": "^0.17.0",
"vimeo/psalm": "^4.30"
},
"suggest": {
"laminas/laminas-cache": "Laminas\\Cache component",
Expand Down
Loading

0 comments on commit d449859

Please sign in to comment.