Skip to content

Commit d4ad26d

Browse files
authored
Merge pull request #5 from MonetDB/dev
Support PHP 8.x
2 parents 7ca30eb + 2204fb1 commit d4ad26d

File tree

9 files changed

+265
-493
lines changed

9 files changed

+265
-493
lines changed

README.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MonetDB-PHP
22
===========
33

4-
The official PHP client library for accessing MonetDB. For PHP 7.2 or above.
4+
The official PHP client library for accessing MonetDB. For PHP 8.x and 7.2 or above (see instructions below).
55

66
Main features:
77
- Parameterized queries, using cached prepared statements.
@@ -18,8 +18,9 @@ then please read the [guide about the client-server protocol](protocol_doc/READM
1818

1919
- [MonetDB-PHP](#monetdb-php)
2020
- [Table of contents](#table-of-contents)
21-
- [Installation with Composer](#installation-with-composer)
21+
- [Installation with Composer (PHP 8.x)](#installation-with-composer-php-8x)
2222
- [Usage without installation](#usage-without-installation)
23+
- [Installation for PHP 7.2](#installation-for-php-72)
2324
- [Examples](#examples)
2425
- [Example 1: Simple query](#example-1-simple-query)
2526
- [Example 2: Get execution stats](#example-2-get-execution-stats)
@@ -36,9 +37,10 @@ then please read the [guide about the client-server protocol](protocol_doc/READM
3637
- [StatusRecord Class](#statusrecord-class)
3738
- [ColumnInfo Class](#columninfo-class)
3839
- [Development setup through the Docker image](#development-setup-through-the-docker-image)
40+
- [Running the integration tests](#running-the-integration-tests)
3941
- [IDE setup](#ide-setup)
4042

41-
# Installation with Composer
43+
# Installation with Composer (PHP 8.x)
4244

4345
This library is available on Packagist at:
4446
- https://packagist.org/packages/tbolner/monetdb-php
@@ -49,12 +51,6 @@ First install [Composer](https://getcomposer.org/download/), then execute the fo
4951
composer require tbolner/monetdb-php
5052
```
5153

52-
Or add the following line to your `composer.json` file's `require` section and then execute `composer update`:
53-
54-
```
55-
"tbolner/monetdb-php": "^1.1"
56-
```
57-
5854
# Usage without installation
5955

6056
You don't need to use [Composer](https://getcomposer.org) in your project. You can
@@ -89,6 +85,14 @@ mb_internal_encoding('UTF-8');
8985
mb_regex_encoding('UTF-8');
9086
```
9187

88+
# Installation for PHP 7.2
89+
90+
Only the 1.x versions supports `PHP 7.x`.
91+
92+
```
93+
composer require tbolner/monetdb-php:1.2
94+
```
95+
9296
# Examples
9397

9498
Example projects:
@@ -431,6 +435,26 @@ $result3 = $connection3->Query("...");
431435

432436
docker/cleanup.sh
433437

438+
# Running the integration tests
439+
440+
- Login into the running container with `docker/login.sh`.
441+
- Execute the tests with:
442+
```
443+
vendor/bin/phpunit tests
444+
```
445+
446+
The output should be similar to:
447+
```
448+
$ vendor/bin/phpunit tests
449+
PHPUnit 8.5.33 by Sebastian Bergmann and contributors.
450+
451+
........................ 24 / 24 (100%)
452+
453+
Time: 971 ms, Memory: 4.00 MB
454+
455+
OK (24 tests, 50 assertions)
456+
```
457+
434458
# IDE setup
435459

436460
- IDE: Visual Studio Code

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"license": "Apache-2.0",
1919
"type": "library",
2020
"require": {
21-
"php": ">=7.2",
21+
"php": ">=7.2 || >=8.0",
2222
"ext-mbstring": "*"
2323
},
2424
"autoload": {

0 commit comments

Comments
 (0)