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
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ tests/ export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
CONTRIBUTING.md export-ignore
phpspec.yml.dist export-ignore
phpunit.xml.dist export-ignore
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 5
- package-ecosystem: composer
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 5
versioning-strategy: widen
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
test:
strategy:
fail-fast: false
matrix:
php-versions: [ '8.2', '8.3', '8.4', '8.5' ]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
tools: composer:v2
extensions: pdo_sqlite

- name: Validate Composer metadata
run: |
if [ -f composer.lock ]; then
composer validate --strict --no-interaction
else
composer validate --strict --no-check-lock --no-interaction
fi

- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache Composer packages
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.json', '**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php-versions }}-

- name: Install dependencies
run: |
if [ -f composer.lock ]; then
composer install --prefer-dist --no-progress --no-interaction
else
composer update --prefer-dist --no-progress --no-interaction
fi

- name: Run test suite
run: vendor/bin/phpunit
7 changes: 0 additions & 7 deletions .scrutinizer.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

27 changes: 5 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,27 @@
# Port DBAL adapter

[![Latest Version](https://img.shields.io/github/release/portphp/dbal.svg?style=flat-square)](https://github.com/portphp/dbal/releases)
[![Build Status](https://travis-ci.org/portphp/dbal.svg)](https://travis-ci.org/portphp/dbal)
[![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)
[![Code Coverage](https://scrutinizer-ci.com/g/portphp/dbal/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/portphp/dbal/?branch=master)
[![CI](https://github.com/portphp/dbal/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/portphp/dbal/actions/workflows/test.yml)
[![PHP Version](https://img.shields.io/packagist/php-v/portphp/dbal.svg?style=flat-square)](https://packagist.org/packages/portphp/dbal)

**Requirements:** PHP ^8.2 (tested on 8.2–8.5). Requires `portphp/portphp` ^2.0 and `doctrine/dbal` ^3 or ^4.

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

## Installation

Open a command console, enter your project directory and execute the
following command to download the latest stable version of this package:

```bash
$ composer require portphp/dbal
```

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

## Documentation

Documentation is available at https://portphp.readthedocs.io/.
Documentation is available at https://portphp.readthedocs.io.

## Issues and feature requests

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

## Contributing

Contributions are very welcome. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for
details. Thanks to [everyone who has contributed](https://github.com/portphp/dbal/graphs/contributors)
already.

## Security

If you discover any security-related issues, please contact us at
[security@portphp.org](mailto:security@portphp.org).

## License

This package is licensed under the [MIT license](LICENSE).
8 changes: 8 additions & 0 deletions UPGRADE-2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Upgrade from 1.x to 2.0

- Minimum PHP is **8.2** (`^8.2`).
- Requires `portphp/portphp` **^2.0**.
- Requires `doctrine/dbal` **^3.0 || ^4.0** (DBAL 2.x is no longer supported).
- `DbalReader` uses the DBAL 3/4 Result API (`executeQuery` / `fetchAssociative`).
- `DbalReaderFactory` no longer implements the file-based `ReaderFactory` interface (it is a SQL factory).
- CI is GitHub Actions (Travis/Scrutinizer removed).
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@
},
{
"name": "Community contributors",
"homepage": "https://github.com/portphp/dbal-adapter/graphs/contributors"
"homepage": "https://github.com/portphp/dbal/graphs/contributors"
}
],
"support": {
"issues": "https://github.com/portphp/portphp/issues",
"source": "https://github.com/portphp/dbal-adapter",
"docs": "https://docs.portphp.org"
"source": "https://github.com/portphp/dbal",
"docs": "https://portphp.readthedocs.io"
},
"require": {
"portphp/portphp": "^1.0.0",
"doctrine/dbal": "^2.4"
"php": "^8.2",
"portphp/portphp": "^2.0",
"doctrine/dbal": "^3.0 || ^4.0"
},
"autoload": {
"psr-4": {
"Port\\Dbal\\": "src/"
}
},
"require-dev": {
"ext-sqlite3": "*",
"phpunit/phpunit": "^4.0",
"phpspec/phpspec": "^2.1"
"ext-pdo_sqlite": "*",
"phpunit/phpunit": "^9.6"
},
"autoload-dev": {
"psr-4": {
Expand All @@ -43,7 +43,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "2.0.x-dev"
}
}
}
5 changes: 0 additions & 5 deletions phpspec.yml.dist

This file was deleted.

18 changes: 5 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
verbose="true"
>
beStrictAboutOutputDuringTests="true">
<testsuites>
<testsuite name="portphp/dbal-adapter">
<directory suffix=".php">./tests/</directory>
<testsuite name="portphp/dbal">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>
24 changes: 0 additions & 24 deletions spec/DbalReaderFactorySpec.php

This file was deleted.

Loading
Loading