Skip to content

Commit

Permalink
Merge pull request #137 from semsol/fix-tests
Browse files Browse the repository at this point in the history
Upgrade vendors, fix tests (prepare version 2.5)
  • Loading branch information
bnowack committed Mar 1, 2020
2 parents 47fca87 + 2e2bc3c commit 3e0c610
Show file tree
Hide file tree
Showing 48 changed files with 485 additions and 278 deletions.
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
*.DS_Store
plugins/*
triggers/*
*.DS_Store
.php_cs.cache
.phpunit.result.cache
composer.lock
docker/docker-compose.yml
plugins/*
triggers/*
tests/coverage/*
/composer.lock
vendor/
tests/config.php
/.php_cs.cache
vendor/
186 changes: 81 additions & 105 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,155 +14,131 @@ matrix:
# For each DB version also tests with different adapters are run (mysqli, PDO).
#
#
# mysql 5.5
#
- php: 5.6
env: DB=mysql:5.5 DB_ADAPTER=mysqli
- php: 5.6
env: DB=mysql:5.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.0
env: DB=mysql:5.5 DB_ADAPTER=mysqli
- php: 7.0
env: DB=mysql:5.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.1
env: DB=mysql:5.5 DB_ADAPTER=mysqli
- php: 7.1
env: DB=mysql:5.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.2
env: DB=mysql:5.5 DB_ADAPTER=mysqli
- php: 7.2
env: DB=mysql:5.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
#
# mysql 5.6
#
- php: 5.6
env: DB=mysql:5.6 DB_ADAPTER=mysqli
- php: 5.6
env: DB=mysql:5.6 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.0
env: DB=mysql:5.6 DB_ADAPTER=mysqli
- php: 7.0
env: DB=mysql:5.6 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.1
env: DB=mysql:5.6 DB_ADAPTER=mysqli
- php: 7.1
env: DB=mysql:5.6 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.2
env: DB=mysql:5.6 DB_ADAPTER=mysqli
- php: 7.2
env: DB=mysql:5.6 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
#
# mysql 5.7
#
- php: 5.6
env: DB=mysql:5.7 DB_ADAPTER=mysqli
- php: 5.6
env: DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 5.6
env: DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.0
- php: 7.2
env: DB=mysql:5.7 DB_ADAPTER=mysqli
- php: 7.0
- php: 7.2
env: DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.0
- php: 7.2
env: DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.1
- php: 7.3
env: DB=mysql:5.7 DB_ADAPTER=mysqli
- php: 7.1
- php: 7.3
env: DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.1
- php: 7.3
env: DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.2
- php: 7.4
env: DB=mysql:5.7 DB_ADAPTER=mysqli
- php: 7.2
- php: 7.4
env: DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.2
- php: 7.4
env: DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
#
# mariadb 10
#
- php: 5.6
env: DB=mariadb:10.0 DB_ADAPTER=mysqli
- php: 5.6
env: DB=mariadb:10.0 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.0
env: DB=mariadb:10.0 DB_ADAPTER=mysqli
- php: 7.0
env: DB=mariadb:10.0 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.1
env: DB=mariadb:10.0 DB_ADAPTER=mysqli
- php: 7.1
env: DB=mariadb:10.0 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.2
env: DB=mariadb:10.0 DB_ADAPTER=mysqli
- php: 7.2
env: DB=mariadb:10.0 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
#
# mariadb 10.1
#
- php: 5.6
env: DB=mariadb:10.1 DB_ADAPTER=mysqli
- php: 5.6
env: DB=mariadb:10.1 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.0
- php: 7.2
env: DB=mariadb:10.1 DB_ADAPTER=mysqli
- php: 7.0
- php: 7.2
env: DB=mariadb:10.1 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.1
- php: 7.2
env: DB=mariadb:10.1 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.3
env: DB=mariadb:10.1 DB_ADAPTER=mysqli
- php: 7.1
- php: 7.3
env: DB=mariadb:10.1 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.2
- php: 7.3
env: DB=mariadb:10.1 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.4
env: DB=mariadb:10.1 DB_ADAPTER=mysqli
- php: 7.2
- php: 7.4
env: DB=mariadb:10.1 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.4
env: DB=mariadb:10.1 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
#
# mariadb 10.2
#
- php: 5.6
- php: 7.2
env: DB=mariadb:10.2 DB_ADAPTER=mysqli
- php: 5.6
- php: 7.2
env: DB=mariadb:10.2 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.0
- php: 7.2
env: DB=mariadb:10.2 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.3
env: DB=mariadb:10.2 DB_ADAPTER=mysqli
- php: 7.0
- php: 7.3
env: DB=mariadb:10.2 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.1
- php: 7.3
env: DB=mariadb:10.2 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.4
env: DB=mariadb:10.2 DB_ADAPTER=mysqli
- php: 7.1
env: DB=mariadb:10.2 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.2
env: DB=mariadb:10.2 DB_ADAPTER=mysqli
- php: 7.2
- php: 7.4
env: DB=mariadb:10.2 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.4
env: DB=mariadb:10.2 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
#
# mariadb 10.3
#
- php: 5.6
- php: 7.2
env: DB=mariadb:10.3 DB_ADAPTER=mysqli
- php: 5.6
- php: 7.2
env: DB=mariadb:10.3 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 5.6
- php: 7.2
env: DB=mariadb:10.3 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.0
- php: 7.3
env: DB=mariadb:10.3 DB_ADAPTER=mysqli
- php: 7.0
- php: 7.3
env: DB=mariadb:10.3 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.0
- php: 7.3
env: DB=mariadb:10.3 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.1
- php: 7.4
env: DB=mariadb:10.3 DB_ADAPTER=mysqli
- php: 7.1
- php: 7.4
env: DB=mariadb:10.3 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.1
- php: 7.4
env: DB=mariadb:10.3 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
#
# mariadb 10.4
#
- php: 7.2
env: DB=mariadb:10.3 DB_ADAPTER=mysqli
env: DB=mariadb:10.4 DB_ADAPTER=mysqli
- php: 7.2
env: DB=mariadb:10.3 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
env: DB=mariadb:10.4 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.2
env: DB=mariadb:10.3 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true

env: DB=mariadb:10.4 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.3
env: DB=mariadb:10.4 DB_ADAPTER=mysqli
- php: 7.3
env: DB=mariadb:10.4 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.3
env: DB=mariadb:10.4 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.4
env: DB=mariadb:10.4 DB_ADAPTER=mysqli
- php: 7.4
env: DB=mariadb:10.4 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.4
env: DB=mariadb:10.4 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
#
# mariadb 10.5
#
- php: 7.2
env: DB=mariadb:10.5 DB_ADAPTER=mysqli
- php: 7.2
env: DB=mariadb:10.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.2
env: DB=mariadb:10.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.3
env: DB=mariadb:10.5 DB_ADAPTER=mysqli
- php: 7.3
env: DB=mariadb:10.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.3
env: DB=mariadb:10.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
- php: 7.4
env: DB=mariadb:10.5 DB_ADAPTER=mysqli
- php: 7.4
env: DB=mariadb:10.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.4
env: DB=mariadb:10.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
git:
depth: 1

Expand Down
41 changes: 16 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
[![Latest Unstable Version](https://poser.pugx.org/semsol/arc2/v/unstable.svg)](https://packagist.org/packages/semsol/arc2)
[![License](https://poser.pugx.org/semsol/arc2/license.svg)](https://packagist.org/packages/semsol/arc2)

ARC2 is a PHP 5.6+ library for working with RDF. It also provides a MySQL-based triplestore with SPARQL support.
ARC2 is a PHP 7.2 library for working with RDF. It also provides a MySQL-based triplestore with SPARQL support.
Older versions of PHP may work, but are not longer tested.

## Installation

Expand All @@ -19,36 +20,32 @@ If you're using Composer to manage dependencies, you can use
composer require semsol/arc2:^2
```

### Branches

`2.3.1` was latest stable version for a long time. But recent developments lead to version `2.4`, which is the next minor version of the 2.x-branch, containing stabilizations, wider test coverage and a couple of new features (e.g. PDO adapter for RDF store). Primary focus was to keep backward compatibility, so that an upgrade doesn't mess up your application. Its not clear how long the 2.x-branch will be maintained, so please consider upgrading to 3.x.

![](doc/branches.png)

Version `3.x` introduces new features and develops the backend further. Unfortunately, overall backward compatibility can not be maintained. One of the major changes is the transition from MyISAM to InnoDB table engine (RDF store).
Further information about composer usage can be found [here](https://getcomposer.org/doc/01-basic-usage.md#autoloading), for instance about autoloading ARC2 classes.

## Requirements

#### PHP

| 5.6 | 7.0 | 7.1 | 7.2 |
|:---------------------:|:------------------:|:------------------:|:------------------:|
| :heavy_check_mark:(1) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| 5.6 | 7.0 | 7.1 | 7.2 | 7.3 | 7.4 |
|:-------:|:----:|:----:|:----:|:----:|:----:|
| :+1:(1) | :+1:(1) | :+1:(1) | :+1: | :+1: | :+1: |

(1) It is compatible with PHP 5.3+ but old versions are no longer tested.

#### Database systems

| | 5.5 | 5.6 | 5.7 | 8.0 |
|:---------:|:------------------:|:------------------:|:------------------:|:---------------:|
| **MySQL** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :collision: (1) |
| | 5.5 | 5.6 | 5.7 | 8.0 |
|:---------:|:----:|:----:|:----:|:---------------:|
| **MySQL** | :+1: | :+1: | :+1: | :collision: (1) |

| | 10.0 | 10.1 | 10.2 | 10.3 |
|:-----------:|:------------------:|:------------------:|:------------------:|:------------------:|
| **MariaDB** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| | 10.0 | 10.1 | 10.2 | 10.3 | 10.4 | 10.5 |
|:-----------:|:-------------:|:----:|:----:|:----:|:----:|:----:|
| **MariaDB** | :question:(2) | :+1: | :+1: | :+1: | :+1: | :+1: |

(1) As long as ARC2 uses mysqli, a connection to MySQL Server 8.0 is not possible. For more information, please look [here](https://github.com/semsol/arc2/commit/0ad48d61753b15ae02ff19f615b14aa52b6557f1). But its planned to switch to PDO ([issue](https://github.com/semsol/arc2/issues/109))

(2) Not tested anymore, because outdated version.


## RDF triple store

Expand Down Expand Up @@ -91,7 +88,7 @@ $store = ARC2::getStore(array(
));
```

ARC2 uses [Symfony Cache](https://symfony.com/doc/current/components/cache.html) , which provides many connectors out of the box ([Overview](https://github.com/symfony/cache/tree/master/Simple)). This allows you to attach ARC2 to a [Redis server](https://github.com/symfony/cache/blob/master/Simple/RedisCache.php), for instance.
ARC2 uses [Symfony Cache](https://symfony.com/doc/4.1/components/cache.html) , which provides many connectors out of the box ([Overview](https://github.com/symfony/cache/tree/master/Simple)).

### Known problems/restrictions with database systems

Expand All @@ -110,10 +107,4 @@ Based on this [source](https://mysqlserverteam.com/upgrading-to-mysql-8-0-defaul
## Internal information for developers

Please have a look [here](doc/developer.md) to find information about maintaining and extending ARC2.

### Docker setup

For ARC2 developers we recommend this following [Docker setup](https://github.com/k00ni/PHP-Apache-MySQL-Docker). It provides a pre-configured set of software (for PHP, DBS etc.) and allows quick switches between different software versions.

For more information have a look [here](https://github.com/k00ni/PHP-Apache-MySQL-Docker).
Please have a look [here](doc/developer.md) to find information about maintaining and extending ARC2 as well as our docker setup for local development.
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "semsol/arc2",
"type": "library",
"description": "ARC2 is a PHP 5.6+ library for working with RDF (It is compatible with PHP 5.3+ but old versions are no longer tested). It also provides a MySQL-based triplestore with SPARQL support.",
"description": "ARC2 is a PHP 5.6+ library for working with RDF (It may be compatible with PHP 5.3+ but outdated versions are no longer tested). It also provides a MySQL-based triplestore with SPARQL support.",
"keywords": ["rdf","sparql"],
"homepage": "https://github.com/semsol/arc2",
"license": [
Expand All @@ -19,20 +19,21 @@
},
{
"name": "Konrad Abicht",
"homepage": "https://pier-and-peer.com",
"email": "konrad.abicht@pier-and-peer.com",
"homepage": "https://inspirito.de",
"email": "hi@inspirito.de",
"role": "Maintainer, Developer"
}
],
"require": {
"php": ">=5.3.0",
"joshcam/mysqli-database-class": "2.*",
"symfony/cache": "3.4.*||4.*"
"php": ">=7.2",
"psr/simple-cache": "^1.0",
"symfony/cache": "^4.4",
"thingengineer/mysqli-database-class": "2.*"
},
"require-dev": {
"doctrine/instantiator": "1.0.*",
"friendsofphp/php-cs-fixer": "2.*",
"phpunit/phpunit": "^5.0"
"doctrine/instantiator": "^1.3",
"friendsofphp/php-cs-fixer": "^2.16.1",
"phpunit/phpunit": "^8.0"
},
"autoload": {
"classmap": ["parsers/", "serializers/", "store/"],
Expand Down
Binary file removed doc/branches.png
Binary file not shown.
8 changes: 6 additions & 2 deletions doc/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ Please make sure your editor uses our `.editorconfig` file.

## Docker setup

For ARC2 developers we recommend this following [Docker setup](https://github.com/k00ni/PHP-Apache-MySQL-Docker). It provides a pre-configured set of software (for PHP, DBS etc.) and allows quick switches between different software versions.
For ARC2 developers we recommend using our docker setup (see folder `docker`). It provides a pre-configured set of software (for PHP, DBS etc.) and allows quick switches between different software versions.

No matter if one needs a MariaDB 10.3 with PHP 7.2 or a PHP 5.6 with MySQL 5.7.0. If there is a docker container, it runs.

### Start

In your terminal go to `docker` folder and run `make`. It will build and start the docker environment as well as log you in.

### Docker and Travis

We use a very wide range of software-combinations to test ARC2 ([Travis](https://travis-ci.org/semsol/arc2)). Currently, all combinations of major versions of PHP and database systems (currently MySQL and MariaDB only) are checked.
We use a very wide range of software-combinations to test ARC2 ([Travis](https://travis-ci.org/semsol/arc2)). Currently, all combinations of supported versions of PHP and database systems (currently MySQL and MariaDB only) are checked.

Using a Docker setup for local development allows to switch the backend very easily. So, if a test with a certain DBS/PHP version combination fails on travis, its very likely that you can reproduce it locally. Dont forget to run `composer update` after a switch to make sure appropriate software is used.
Loading

0 comments on commit 3e0c610

Please sign in to comment.