Skip to content

Commit

Permalink
Add compatibility for PHP8, deprecate PHP7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Feb 24, 2021
1 parent 1a605e8 commit bc7a74f
Show file tree
Hide file tree
Showing 18 changed files with 1,022 additions and 251 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ 'ubuntu-18.04' ] #, macos-latest, windows-latest ]
php-version: [ '7.2', '7.3', '7.4' ]
php-version: [ '7.3', '7.4', '8.0', '8.1' ]

name: PHP ${{ matrix.php-version }} on OS ${{ matrix.os }}
steps:
Expand All @@ -32,8 +32,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
# Select PHPUnit version suitable for PHP 7.2.
tools: composer, phpunit:^8.5
tools: composer, phpunit:^9.5

# Cache Composer Dependencies
# https://github.com/marketplace/actions/setup-php-action#cache-composer-dependencies
Expand All @@ -58,15 +57,15 @@ jobs:

# https://github.com/php-coveralls/php-coveralls#github-actions
- name: Upload coverage results to Coveralls
if: always() && matrix.php-version == '7.4'
if: always() && (matrix.php-version == '7.4' || matrix.php-version == '8.0')
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
- name: Upload coverage results to Scrutinizer CI
if: always() && matrix.php-version == '7.4'
if: always() && (matrix.php-version == '7.4' || matrix.php-version == '8.0')
run: |
echo "Git HEAD ref:"
git log --pretty=%P -n1 HEAD
Expand Down
10 changes: 8 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build:
analysis:
environment:
php:
version: 7.4
version: 8.0
tests:
override:
- php-scrutinizer-run --enable-security-analysis
Expand All @@ -39,4 +39,10 @@ build:

# https://scrutinizer-ci.com/docs/tools/external-code-coverage/
tools:
external_code_coverage: true
external_code_coverage:

enabled: true

# Scrutinizer will wait for two code coverage submissions
# in order to cover both PHP7 and PHP8.
runs: 2
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Unreleased
==========

- Added compatibility for PHP8, deprecated PHP7.2

- Bumped required guzzle http client dependency to ``^7.2``

2020/09/28 1.1.0
Expand Down
10 changes: 9 additions & 1 deletion DEVELOP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ Installation

Install prerequisites::

brew install [email protected] composer
# Install different PHP releases.
brew install [email protected] [email protected] [email protected] composer

# Select PHP version.
brew-php-switcher 7.3
brew-php-switcher 7.4
brew-php-switcher 8.0

# Install xdebug extension for tracking code coverage.
pecl install xdebug

Get the sources::
Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ CrateDB PDO Adapter
:target: https://packagist.org/packages/crate/crate-pdo
:alt: Latest stable version

.. image:: https://img.shields.io/badge/PHP-7.3%2C%207.4%2C%208.0-green.svg
:target: https://packagist.org/packages/crate/crate-pdo
:alt: Supported PHP versions

.. image:: https://poser.pugx.org/crate/crate-pdo/d/monthly
:target: https://packagist.org/packages/crate/crate-pdo
:alt: Monthly downloads

.. image:: https://poser.pugx.org/crate/crate-pdo/license
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"homepage": "https://github.com/crate/crate-pdo",
"keywords": ["database", "pdo", "cratedb"],
"require": {
"php": "^7.2",
"php": "^7.3|^8.0|^8.1",
"ext-pdo": "*",
"guzzlehttp/guzzle": "^7.2"
},
Expand All @@ -23,7 +23,7 @@
}
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^0.12",
"squizlabs/php_codesniffer": "^3.5"
},
Expand Down
Loading

0 comments on commit bc7a74f

Please sign in to comment.