Skip to content

Commit 4a31947

Browse files
authored
Release 2.0.0 (#9)
Release 2.0.0: PHP ^8.2, portphp ^2.0, DBAL 3/4
2 parents 2e93304 + 20f59e3 commit 4a31947

15 files changed

Lines changed: 268 additions & 464 deletions

.gitattributes

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,5 @@ tests/ export-ignore
33
.editorconfig export-ignore
44
.gitattributes export-ignore
55
.gitignore export-ignore
6-
.scrutinizer.yml export-ignore
7-
.travis.yml export-ignore
86
CONTRIBUTING.md export-ignore
9-
phpspec.yml.dist export-ignore
107
phpunit.xml.dist export-ignore

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5
8+
- package-ecosystem: composer
9+
directory: /
10+
schedule:
11+
interval: monthly
12+
open-pull-requests-limit: 5
13+
versioning-strategy: widen

.github/workflows/test.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php-versions: [ '8.2', '8.3', '8.4', '8.5' ]
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php-versions }}
28+
coverage: none
29+
tools: composer:v2
30+
extensions: pdo_sqlite
31+
32+
- name: Validate Composer metadata
33+
run: |
34+
if [ -f composer.lock ]; then
35+
composer validate --strict --no-interaction
36+
else
37+
composer validate --strict --no-check-lock --no-interaction
38+
fi
39+
40+
- name: Get Composer cache directory
41+
id: composer-cache
42+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
43+
44+
- name: Cache Composer packages
45+
uses: actions/cache@v4
46+
with:
47+
path: ${{ steps.composer-cache.outputs.dir }}
48+
key: ${{ runner.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.json', '**/composer.lock') }}
49+
restore-keys: |
50+
${{ runner.os }}-composer-${{ matrix.php-versions }}-
51+
52+
- name: Install dependencies
53+
run: |
54+
if [ -f composer.lock ]; then
55+
composer install --prefer-dist --no-progress --no-interaction
56+
else
57+
composer update --prefer-dist --no-progress --no-interaction
58+
fi
59+
60+
- name: Run test suite
61+
run: vendor/bin/phpunit

.scrutinizer.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,27 @@
11
# Port DBAL adapter
22

33
[![Latest Version](https://img.shields.io/github/release/portphp/dbal.svg?style=flat-square)](https://github.com/portphp/dbal/releases)
4-
[![Build Status](https://travis-ci.org/portphp/dbal.svg)](https://travis-ci.org/portphp/dbal)
5-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/portphp/dbal/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/portphp/dbal/?branch=master)
6-
[![Code Coverage](https://scrutinizer-ci.com/g/portphp/dbal/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/portphp/dbal/?branch=master)
4+
[![CI](https://github.com/portphp/dbal/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/portphp/dbal/actions/workflows/test.yml)
5+
[![PHP Version](https://img.shields.io/packagist/php-v/portphp/dbal.svg?style=flat-square)](https://packagist.org/packages/portphp/dbal)
6+
7+
**Requirements:** PHP ^8.2 (tested on 8.2–8.5). Requires `portphp/portphp` ^2.0 and `doctrine/dbal` ^3 or ^4.
78

89
Doctrine DBAL adapter for [Port](https://github.com/portphp).
910

1011
## Installation
1112

12-
Open a command console, enter your project directory and execute the
13-
following command to download the latest stable version of this package:
14-
1513
```bash
1614
$ composer require portphp/dbal
1715
```
1816

19-
This command requires you to have Composer installed globally, as explained
20-
in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
21-
of the Composer documentation.
22-
2317
## Documentation
2418

25-
Documentation is available at https://portphp.readthedocs.io/.
19+
Documentation is available at https://portphp.readthedocs.io.
2620

2721
## Issues and feature requests
2822

2923
Please report issues and request features at https://github.com/portphp/portphp/issues.
3024

31-
## Contributing
32-
33-
Contributions are very welcome. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for
34-
details. Thanks to [everyone who has contributed](https://github.com/portphp/dbal/graphs/contributors)
35-
already.
36-
37-
## Security
38-
39-
If you discover any security-related issues, please contact us at
40-
[security@portphp.org](mailto:security@portphp.org).
41-
4225
## License
4326

4427
This package is licensed under the [MIT license](LICENSE).

UPGRADE-2.0.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Upgrade from 1.x to 2.0
2+
3+
- Minimum PHP is **8.2** (`^8.2`).
4+
- Requires `portphp/portphp` **^2.0**.
5+
- Requires `doctrine/dbal` **^3.0 || ^4.0** (DBAL 2.x is no longer supported).
6+
- `DbalReader` uses the DBAL 3/4 Result API (`executeQuery` / `fetchAssociative`).
7+
- `DbalReaderFactory` no longer implements the file-based `ReaderFactory` interface (it is a SQL factory).
8+
- CI is GitHub Actions (Travis/Scrutinizer removed).

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@
1414
},
1515
{
1616
"name": "Community contributors",
17-
"homepage": "https://github.com/portphp/dbal-adapter/graphs/contributors"
17+
"homepage": "https://github.com/portphp/dbal/graphs/contributors"
1818
}
1919
],
2020
"support": {
2121
"issues": "https://github.com/portphp/portphp/issues",
22-
"source": "https://github.com/portphp/dbal-adapter",
23-
"docs": "https://docs.portphp.org"
22+
"source": "https://github.com/portphp/dbal",
23+
"docs": "https://portphp.readthedocs.io"
2424
},
2525
"require": {
26-
"portphp/portphp": "^1.0.0",
27-
"doctrine/dbal": "^2.4"
26+
"php": "^8.2",
27+
"portphp/portphp": "^2.0",
28+
"doctrine/dbal": "^3.0 || ^4.0"
2829
},
2930
"autoload": {
3031
"psr-4": {
3132
"Port\\Dbal\\": "src/"
3233
}
3334
},
3435
"require-dev": {
35-
"ext-sqlite3": "*",
36-
"phpunit/phpunit": "^4.0",
37-
"phpspec/phpspec": "^2.1"
36+
"ext-pdo_sqlite": "*",
37+
"phpunit/phpunit": "^9.6"
3838
},
3939
"autoload-dev": {
4040
"psr-4": {
@@ -43,7 +43,7 @@
4343
},
4444
"extra": {
4545
"branch-alias": {
46-
"dev-master": "1.0.x-dev"
46+
"dev-master": "2.0.x-dev"
4747
}
4848
}
4949
}

phpspec.yml.dist

Lines changed: 0 additions & 5 deletions
This file was deleted.

phpunit.xml.dist

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<phpunit backupGlobals="false"
4-
backupStaticAttributes="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
54
bootstrap="vendor/autoload.php"
65
colors="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
11-
stopOnFailure="false"
12-
syntaxCheck="false"
13-
verbose="true"
14-
>
6+
beStrictAboutOutputDuringTests="true">
157
<testsuites>
16-
<testsuite name="portphp/dbal-adapter">
17-
<directory suffix=".php">./tests/</directory>
8+
<testsuite name="portphp/dbal">
9+
<directory>tests</directory>
1810
</testsuite>
1911
</testsuites>
2012
</phpunit>

0 commit comments

Comments
 (0)