Skip to content
Draft
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
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
matrix:
os: [ 'ubuntu-latest' ] #, macos-latest, windows-latest ]
php-version: [
'8.0',
'8.1',
'8.2',
'8.3',
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CrateDB DBAL Driver
:target: https://packagist.org/packages/crate/crate-dbal
:alt: Latest stable version

.. image:: https://img.shields.io/badge/PHP-8.0%2C%208.1%2C%208.2%2C%208.3%2C%208.4%2C%208.5-green.svg
.. image:: https://img.shields.io/badge/PHP-8.1%2C%208.2%2C%208.3%2C%208.4%2C%208.5-green.svg
:target: https://packagist.org/packages/crate/crate-dbal
:alt: Supported PHP versions

Expand Down
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.0|^8.1|^8.2|^8.3|^8.4|^8.5",
"doctrine/dbal": "^3",
"php": "^8.1|^8.2|^8.3|^8.4|^8.5",
"doctrine/dbal": "^4",
"crate/crate-pdo": "^2",
"ext-pdo": "*"
"ext-pdo": "*",
"slam/dbal-debugstack-middleware": "*"
},
"autoload": {
"psr-0": {
Expand All @@ -27,7 +28,8 @@
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"friendsofphp/php-cs-fixer": "^3.89"
"friendsofphp/php-cs-fixer": "^3.89",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload-dev": {
"psr-0": {
Expand All @@ -44,7 +46,7 @@
},
"scripts": {
"test": "XDEBUG_MODE=coverage phpunit --coverage-clover build/logs/clover.xml",
"check-style": "php-cs-fixer check",
"fix-style": "php-cs-fixer fix"
"check-style": "phpcs && php-cs-fixer check --verbose --diff",
"fix-style": "phpcbf && php-cs-fixer fix"
}
}
4 changes: 2 additions & 2 deletions src/Crate/DBAL/Driver/PDOCrate/CrateStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function rowCount(): int
/**
* {@inheritDoc}
*/
public function bindValue($param, $value, $type = ParameterType::STRING): void
public function bindValue($param, $value, ParameterType $type = ParameterType::STRING): void
{
$this->stmt->bindValue($param, $value, $type);
}
Expand All @@ -100,7 +100,7 @@ public function bindValue($param, $value, $type = ParameterType::STRING): void
* @deprecated Use bindValue() instead.
* {@inheritDoc}
*/
public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null)
public function bindParam($param, &$variable, ParameterType $type = ParameterType::STRING, $length = null)
{
Deprecation::trigger(
'doctrine/dbal',
Expand Down
6 changes: 4 additions & 2 deletions src/Crate/DBAL/Driver/PDOCrate/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\ServerVersionProvider;
use SensitiveParameter;

class Driver implements \Doctrine\DBAL\Driver
Expand Down Expand Up @@ -74,8 +75,9 @@ private function constructPdoDsn(array $params): string

/**
* {@inheritDoc}
* @param ServerVersionProvider $versionProvider
*/
public function getDatabasePlatform(): AbstractPlatform
public function getDatabasePlatform(ServerVersionProvider $versionProvider): AbstractPlatform
{
return new CratePlatform4();
}
Expand All @@ -102,7 +104,7 @@ public function getName(): string
*/
public function getDatabase(Connection $conn): string|null
{
return null;
return 'doc';
}

/**
Expand Down
Loading
Loading