Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 33 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MonetDB-PHP
===========

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

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

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

# Installation with Composer
# Installation with Composer (PHP 8.x)

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

Or add the following line to your `composer.json` file's `require` section and then execute `composer update`:

```
"tbolner/monetdb-php": "^1.1"
```

# Usage without installation

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

# Installation for PHP 7.2

Only the 1.x versions supports `PHP 7.x`.

```
composer require tbolner/monetdb-php:1.2
```

# Examples

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

docker/cleanup.sh

# Running the integration tests

- Login into the running container with `docker/login.sh`.
- Execute the tests with:
```
vendor/bin/phpunit tests
```

The output should be similar to:
```
$ vendor/bin/phpunit tests
PHPUnit 8.5.33 by Sebastian Bergmann and contributors.

........................ 24 / 24 (100%)

Time: 971 ms, Memory: 4.00 MB

OK (24 tests, 50 assertions)
```

# IDE setup

- IDE: Visual Studio Code
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"license": "Apache-2.0",
"type": "library",
"require": {
"php": ">=7.2",
"php": ">=7.2 || >=8.0",
"ext-mbstring": "*"
},
"autoload": {
Expand Down
Loading