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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.0, 7.1, 7.2, 7.3, 7.4]
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3]

name: PHP ${{ matrix.php }}

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## v4.3.0 - 2024-09-29

### Added

- Support for PHP 8

## v4.2.1 - 2021-04-14

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The full documentation for this library can be found [here][documentation]

## Requirements

* PHP 7.0.* or higher
* PHP 7 or higher
* PDO

## Installation
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"test": "vendor/bin/phpunit"
},
"require": {
"php": "^7.0",
"php": "^7.0 || ^8.0",
"ext-pdo": "*"
},
"require-dev": {
"phpunit/phpunit": "^6.5 || ^7.0",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0",
"symfony/yaml": "^3.4"
},
"autoload": {
Expand Down
22 changes: 22 additions & 0 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -633,4 +633,26 @@ public function unserialize($data)
$this->{$key} = $value;
}
}

public function __serialize()
{
return [
'username' => $this->username,
'password' => $this->password,
'logQueries' => $this->logQueries,
'options' => $this->options,
'commands' => $this->commands,
'dsn' => $this->dsn,
];
}

public function __unserialize(array $data)
{
$this->username = $data['username'];
$this->password = $data['password'];
$this->logQueries = $data['logQueries'];
$this->options = $data['options'];
$this->commands = $data['commands'];
$this->dsn = $data['dsn'];
}
}
4 changes: 2 additions & 2 deletions tests/SQL/BaseClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class BaseClass extends TestCase
/** @var Database */
protected $db;

public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
static::$database = new Database(new Connection(''));
}

public function setUp()
public function setUp(): void
{
$this->db = static::$database;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Schema/BaseClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class BaseClass extends TestCase
/** @var Schema */
protected $schema;

public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
$name = static::$schema_name;

Expand All @@ -50,7 +50,7 @@ public static function setUpBeforeClass()
static::$db_schema = new Schema(new Connection($name));
}

public function setUp()
public function setUp(): void
{
$this->schema = static::$db_schema;
}
Expand Down