mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-09-28 20:29:06 +02:00
Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4608fd7609 | ||
|
7de82cc6ca | ||
|
2aadb9194b | ||
|
ec9a14f033 | ||
|
0a1085ab41 | ||
|
e484046171 | ||
|
4f50dd55a2 | ||
|
fe426145d8 | ||
|
15d4e9550b | ||
|
c529b8375c | ||
|
7962f7c919 | ||
|
2946e07319 | ||
|
0a05cbcc17 | ||
|
0c2d67443a | ||
|
5c07020dc6 | ||
|
a8c5c18a25 | ||
|
35874a9d77 | ||
|
78792957f3 | ||
|
a4d1e42c71 |
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@ -12,14 +12,19 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
# set phpunit to false to prevent automatic generation of mysql phpunit jobs
|
# set phpunit to false to prevent automatic generation of mysql phpunit jobs
|
||||||
phpunit: false
|
phpunit: false
|
||||||
|
preserve_vendor_tests: true
|
||||||
extra_jobs: |
|
extra_jobs: |
|
||||||
- php: 7.4
|
|
||||||
db: pgsql
|
|
||||||
phpunit: true
|
|
||||||
composer_args: --prefer-lowest
|
|
||||||
- php: 8.0
|
|
||||||
db: pgsql
|
|
||||||
phpunit: true
|
|
||||||
- php: 8.1
|
- php: 8.1
|
||||||
db: pgsql
|
db: pgsql
|
||||||
phpunit: true
|
phpunit: true
|
||||||
|
composer_args: --prefer-lowest
|
||||||
|
phpunit_suite: all
|
||||||
|
- php: 8.1
|
||||||
|
db: pgsql
|
||||||
|
phpunit: true
|
||||||
|
phpunit_suite: all
|
||||||
|
- php: 8.2
|
||||||
|
db: pgsql
|
||||||
|
phpunit: true
|
||||||
|
phpunit_suite: all
|
||||||
|
|
||||||
|
10
README.md
10
README.md
@ -3,15 +3,9 @@
|
|||||||
[![CI](https://github.com/silverstripe/silverstripe-postgresql/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-postgresql/actions/workflows/ci.yml)
|
[![CI](https://github.com/silverstripe/silverstripe-postgresql/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-postgresql/actions/workflows/ci.yml)
|
||||||
[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)
|
[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
* Silverstripe 4.0
|
|
||||||
* PostgreSQL >=9.2
|
|
||||||
* Note: PostgreSQL 10 has not been tested
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```
|
```sh
|
||||||
composer require silverstripe/postgresql
|
composer require silverstripe/postgresql
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -27,7 +21,7 @@ SS_DATABASE_USERNAME=
|
|||||||
SS_DATABASE_PASSWORD=
|
SS_DATABASE_PASSWORD=
|
||||||
```
|
```
|
||||||
|
|
||||||
See [environment variables](https://docs.silverstripe.org/en/4/getting_started/environment_management) for more details. Note that a database will automatically be created via `dev/build`.
|
See [environment variables](https://docs.silverstripe.org/en/getting_started/environment_management) for more details. Note that a database will automatically be created via `dev/build`.
|
||||||
|
|
||||||
### Through the installer
|
### Through the installer
|
||||||
|
|
||||||
|
@ -2,12 +2,6 @@
|
|||||||
name: postgresqlconnectors
|
name: postgresqlconnectors
|
||||||
---
|
---
|
||||||
SilverStripe\Core\Injector\Injector:
|
SilverStripe\Core\Injector\Injector:
|
||||||
PostgrePDODatabase:
|
|
||||||
class: 'SilverStripe\PostgreSQL\PostgreSQLDatabase'
|
|
||||||
properties:
|
|
||||||
connector: '%$PDOConnector'
|
|
||||||
schemaManager: '%$PostgreSQLSchemaManager'
|
|
||||||
queryBuilder: '%$PostgreSQLQueryBuilder'
|
|
||||||
PostgreSQLDatabase:
|
PostgreSQLDatabase:
|
||||||
class: 'SilverStripe\PostgreSQL\PostgreSQLDatabase'
|
class: 'SilverStripe\PostgreSQL\PostgreSQLDatabase'
|
||||||
properties:
|
properties:
|
||||||
|
@ -3,23 +3,6 @@
|
|||||||
use SilverStripe\Dev\Install\DatabaseAdapterRegistry;
|
use SilverStripe\Dev\Install\DatabaseAdapterRegistry;
|
||||||
use SilverStripe\PostgreSQL\PostgreSQLDatabaseConfigurationHelper;
|
use SilverStripe\PostgreSQL\PostgreSQLDatabaseConfigurationHelper;
|
||||||
|
|
||||||
// PDO Postgre database
|
|
||||||
DatabaseAdapterRegistry::register(array(
|
|
||||||
/** @skipUpgrade */
|
|
||||||
'class' => 'PostgrePDODatabase',
|
|
||||||
'module' => 'postgresql',
|
|
||||||
'title' => 'PostgreSQL 8.3+ (using PDO)',
|
|
||||||
'helperPath' => __DIR__.'/code/PostgreSQLDatabaseConfigurationHelper.php',
|
|
||||||
'helperClass' => PostgreSQLDatabaseConfigurationHelper::class,
|
|
||||||
'supported' => (class_exists('PDO') && in_array('postgresql', PDO::getAvailableDrivers())),
|
|
||||||
'missingExtensionText' =>
|
|
||||||
'Either the <a href="http://www.php.net/manual/en/book.pdo.php">PDO Extension</a> or
|
|
||||||
the <a href="http://www.php.net/manual/en/ref.pdo-sqlsrv.php">SQL Server PDO Driver</a>
|
|
||||||
are unavailable. Please install or enable these and refresh this page.'
|
|
||||||
));
|
|
||||||
|
|
||||||
|
|
||||||
// PDO Postgre database
|
|
||||||
DatabaseAdapterRegistry::register(array(
|
DatabaseAdapterRegistry::register(array(
|
||||||
/** @skipUpgrade */
|
/** @skipUpgrade */
|
||||||
'class' => 'PostgreSQLDatabase',
|
'class' => 'PostgreSQLDatabase',
|
||||||
|
@ -11,9 +11,6 @@ use ErrorException;
|
|||||||
* The connector doesn't know anything about schema selection, so code related to
|
* The connector doesn't know anything about schema selection, so code related to
|
||||||
* masking multiple databases as schemas should be handled in the database controller
|
* masking multiple databases as schemas should be handled in the database controller
|
||||||
* and schema manager.
|
* and schema manager.
|
||||||
*
|
|
||||||
* @package sapphire
|
|
||||||
* @subpackage model
|
|
||||||
*/
|
*/
|
||||||
class PostgreSQLConnector extends DBConnector
|
class PostgreSQLConnector extends DBConnector
|
||||||
{
|
{
|
||||||
@ -75,7 +72,7 @@ class PostgreSQLConnector extends DBConnector
|
|||||||
|
|
||||||
// Note: Postgres always behaves as though $selectDB = true, ignoring
|
// Note: Postgres always behaves as though $selectDB = true, ignoring
|
||||||
// any value actually passed in. The controller passes in true for other
|
// any value actually passed in. The controller passes in true for other
|
||||||
// connectors such as PDOConnector.
|
// connectors
|
||||||
|
|
||||||
// Escape parameters
|
// Escape parameters
|
||||||
$arguments = array(
|
$arguments = array(
|
||||||
@ -116,8 +113,7 @@ class PostgreSQLConnector extends DBConnector
|
|||||||
|
|
||||||
public function getGeneratedID($table)
|
public function getGeneratedID($table)
|
||||||
{
|
{
|
||||||
$result = $this->query("SELECT currval('\"{$table}_ID_seq\"')")->first();
|
return $this->query("SELECT currval(pg_get_serial_sequence('\"{$table}\"','ID'))")->value();
|
||||||
return $result['currval'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLastError()
|
public function getLastError()
|
||||||
@ -222,7 +218,6 @@ class PostgreSQLConnector extends DBConnector
|
|||||||
|
|
||||||
// Execute query
|
// Execute query
|
||||||
// Unfortunately error-suppression is required in order to handle sql errors elegantly.
|
// Unfortunately error-suppression is required in order to handle sql errors elegantly.
|
||||||
// Please use PDO if you can help it
|
|
||||||
if (!empty($parameters)) {
|
if (!empty($parameters)) {
|
||||||
$result = @pg_query_params($this->dbConn, $sql, $parameters);
|
$result = @pg_query_params($this->dbConn, $sql, $parameters);
|
||||||
} else {
|
} else {
|
||||||
|
@ -214,7 +214,7 @@ class PostgreSQLDatabase extends Database
|
|||||||
}
|
}
|
||||||
$this->schemaOriginal = $parameters['schema'];
|
$this->schemaOriginal = $parameters['schema'];
|
||||||
|
|
||||||
// Ensure that driver is available (required by PDO)
|
// Ensure that driver is available
|
||||||
if (empty($parameters['driver'])) {
|
if (empty($parameters['driver'])) {
|
||||||
$parameters['driver'] = $this->getDatabaseServer();
|
$parameters['driver'] = $this->getDatabaseServer();
|
||||||
}
|
}
|
||||||
@ -574,13 +574,14 @@ class PostgreSQLDatabase extends Database
|
|||||||
return $this->transactionNesting;
|
return $this->transactionNesting;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function transactionEnd($chain = false)
|
public function transactionEnd($chain = false): ?bool
|
||||||
{
|
{
|
||||||
--$this->transactionNesting;
|
--$this->transactionNesting;
|
||||||
if ($this->transactionNesting <= 0) {
|
if ($this->transactionNesting <= 0) {
|
||||||
$this->transactionNesting = 0;
|
$this->transactionNesting = 0;
|
||||||
$this->query('COMMIT;');
|
$this->query('COMMIT;');
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function comparisonClause($field, $value, $exact = false, $negate = false, $caseSensitive = null, $parameterised = false)
|
public function comparisonClause($field, $value, $exact = false, $negate = false, $caseSensitive = null, $parameterised = false)
|
||||||
|
@ -5,7 +5,6 @@ namespace SilverStripe\PostgreSQL;
|
|||||||
use SilverStripe\Dev\Install\DatabaseAdapterRegistry;
|
use SilverStripe\Dev\Install\DatabaseAdapterRegistry;
|
||||||
use SilverStripe\Dev\Install\DatabaseConfigurationHelper;
|
use SilverStripe\Dev\Install\DatabaseConfigurationHelper;
|
||||||
use Exception;
|
use Exception;
|
||||||
use PDO;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a helper class for the SS installer.
|
* This is a helper class for the SS installer.
|
||||||
@ -40,10 +39,6 @@ class PostgreSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelp
|
|||||||
$connstring = "host=$server port=5432 dbname=postgres{$userPart}{$passwordPart}";
|
$connstring = "host=$server port=5432 dbname=postgres{$userPart}{$passwordPart}";
|
||||||
$conn = pg_connect($connstring);
|
$conn = pg_connect($connstring);
|
||||||
break;
|
break;
|
||||||
case 'PostgrePDODatabase':
|
|
||||||
// May throw a PDOException if fails
|
|
||||||
$conn = @new PDO('postgresql:host='.$server.';dbname=postgres;port=5432', $username, $password);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
$error = 'Invalid connection type: ' . $databaseConfig['type'];
|
$error = 'Invalid connection type: ' . $databaseConfig['type'];
|
||||||
return null;
|
return null;
|
||||||
@ -92,8 +87,6 @@ class PostgreSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelp
|
|||||||
$conn = $this->createConnection($databaseConfig, $error);
|
$conn = $this->createConnection($databaseConfig, $error);
|
||||||
if (!$conn) {
|
if (!$conn) {
|
||||||
return false;
|
return false;
|
||||||
} elseif ($conn instanceof PDO) {
|
|
||||||
return $conn->getAttribute(PDO::ATTR_SERVER_VERSION);
|
|
||||||
} elseif (is_resource($conn)) {
|
} elseif (is_resource($conn)) {
|
||||||
$info = pg_version($conn);
|
$info = pg_version($conn);
|
||||||
return $info['server'];
|
return $info['server'];
|
||||||
@ -139,11 +132,7 @@ class PostgreSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelp
|
|||||||
protected function query($conn, $sql)
|
protected function query($conn, $sql)
|
||||||
{
|
{
|
||||||
$items = array();
|
$items = array();
|
||||||
if ($conn instanceof PDO) {
|
if (is_resource($conn)) {
|
||||||
foreach ($conn->query($sql) as $row) {
|
|
||||||
$items[] = $row[0];
|
|
||||||
}
|
|
||||||
} elseif (is_resource($conn)) {
|
|
||||||
$result = pg_query($conn, $sql);
|
$result = pg_query($conn, $sql);
|
||||||
while ($row = pg_fetch_row($result)) {
|
while ($row = pg_fetch_row($result)) {
|
||||||
$items[] = $row[0];
|
$items[] = $row[0];
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace SilverStripe\PostgreSQL;
|
namespace SilverStripe\PostgreSQL;
|
||||||
|
|
||||||
|
use Iterator;
|
||||||
use SilverStripe\ORM\Connect\Query;
|
use SilverStripe\ORM\Connect\Query;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,12 +57,13 @@ class PostgreSQLQuery extends Query
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function seek($row)
|
public function getIterator(): Iterator
|
||||||
{
|
{
|
||||||
// Specifying the zero-th record here will reset the pointer
|
while ($row = pg_fetch_array($this->handle, null, PGSQL_NUM)) {
|
||||||
$result = pg_fetch_array($this->handle, $row, PGSQL_NUM);
|
yield $this->parseResult($row);
|
||||||
|
}
|
||||||
return $this->parseResult($result);
|
// Reset so the query can be iterated over again
|
||||||
|
pg_result_seek($this->handle, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function numRecords()
|
public function numRecords()
|
||||||
@ -69,18 +71,6 @@ class PostgreSQLQuery extends Query
|
|||||||
return pg_num_rows($this->handle);
|
return pg_num_rows($this->handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function nextRecord()
|
|
||||||
{
|
|
||||||
$row = pg_fetch_array($this->handle, null, PGSQL_NUM);
|
|
||||||
|
|
||||||
// Correct non-string types
|
|
||||||
if ($row) {
|
|
||||||
return $this->parseResult($row);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $row
|
* @param array $row
|
||||||
* @return array
|
* @return array
|
||||||
|
@ -79,7 +79,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
public function postgresDatabaseExists($name)
|
public function postgresDatabaseExists($name)
|
||||||
{
|
{
|
||||||
$result = $this->preparedQuery("SELECT datname FROM pg_database WHERE datname = ?;", array($name));
|
$result = $this->preparedQuery("SELECT datname FROM pg_database WHERE datname = ?;", array($name));
|
||||||
return $result->first() ? true : false;
|
return $result->value() ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function databaseExists($name)
|
public function databaseExists($name)
|
||||||
@ -146,7 +146,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
return $this->preparedQuery(
|
return $this->preparedQuery(
|
||||||
"SELECT nspname FROM pg_catalog.pg_namespace WHERE nspname = ?;",
|
"SELECT nspname FROM pg_catalog.pg_namespace WHERE nspname = ?;",
|
||||||
array($name)
|
array($name)
|
||||||
)->first() ? true : false;
|
)->value() ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -462,7 +462,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
$stats = $this->preparedQuery(
|
$stats = $this->preparedQuery(
|
||||||
"SELECT relid FROM pg_stat_user_tables WHERE relname = ?;",
|
"SELECT relid FROM pg_stat_user_tables WHERE relname = ?;",
|
||||||
array($table)
|
array($table)
|
||||||
)->first();
|
)->record();
|
||||||
$oid = $stats['relid'];
|
$oid = $stats['relid'];
|
||||||
|
|
||||||
//Now we can run a long query to get the clustered status:
|
//Now we can run a long query to get the clustered status:
|
||||||
@ -473,7 +473,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i
|
FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i
|
||||||
WHERE c.oid = ? AND c.oid = i.indrelid AND i.indexrelid = c2.oid AND indisclustered='t';",
|
WHERE c.oid = ? AND c.oid = i.indrelid AND i.indexrelid = c2.oid AND indisclustered='t';",
|
||||||
array($oid)
|
array($oid)
|
||||||
)->first();
|
)->value();
|
||||||
|
|
||||||
if ($clustered) {
|
if ($clustered) {
|
||||||
$this->query("ALTER TABLE \"$table\" SET WITHOUT CLUSTER;");
|
$this->query("ALTER TABLE \"$table\" SET WITHOUT CLUSTER;");
|
||||||
@ -842,18 +842,14 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
$this->database->currentSchema(),
|
$this->database->currentSchema(),
|
||||||
$triggerName
|
$triggerName
|
||||||
]
|
]
|
||||||
)->first();
|
)->record();
|
||||||
|
|
||||||
// Convert stream to string
|
// Convert stream to string
|
||||||
if (is_resource($trigger['tgargs'])) {
|
if (is_resource($trigger['tgargs'])) {
|
||||||
$trigger['tgargs'] = stream_get_contents($trigger['tgargs']);
|
$trigger['tgargs'] = stream_get_contents($trigger['tgargs']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($trigger['tgargs'], "\000") !== false) {
|
// hex-encoded (pg_sql non-pdo)
|
||||||
// Option 1: output as a string (PDO)
|
|
||||||
$argList = array_filter(explode("\000", $trigger['tgargs']));
|
|
||||||
} else {
|
|
||||||
// Option 2: hex-encoded (pg_sql non-pdo)
|
|
||||||
$bytes = str_split($trigger['tgargs'], 2);
|
$bytes = str_split($trigger['tgargs'], 2);
|
||||||
$argList = array();
|
$argList = array();
|
||||||
$nextArg = "";
|
$nextArg = "";
|
||||||
@ -867,7 +863,6 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
$nextArg .= chr(hexdec($byte));
|
$nextArg .= chr(hexdec($byte));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Drop first two arguments (trigger name and config name) and implode into nice list
|
// Drop first two arguments (trigger name and config name) and implode into nice list
|
||||||
return array_slice($argList, 2);
|
return array_slice($argList, 2);
|
||||||
@ -968,7 +963,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
WHERE r.contype = 'c' AND conname = ? AND n.nspname = ?
|
WHERE r.contype = 'c' AND conname = ? AND n.nspname = ?
|
||||||
ORDER BY 1;",
|
ORDER BY 1;",
|
||||||
array($constraint, $this->database->currentSchema())
|
array($constraint, $this->database->currentSchema())
|
||||||
)->first();
|
)->record();
|
||||||
if (!$cache) {
|
if (!$cache) {
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
@ -1048,7 +1043,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
FROM information_schema.triggers
|
FROM information_schema.triggers
|
||||||
WHERE trigger_name = ? AND trigger_schema = ?;",
|
WHERE trigger_name = ? AND trigger_schema = ?;",
|
||||||
array($triggerName, $this->database->currentSchema())
|
array($triggerName, $this->database->currentSchema())
|
||||||
)->first();
|
)->value();
|
||||||
if ($exists) {
|
if ($exists) {
|
||||||
$this->query("DROP trigger IF EXISTS $triggerName ON \"$tableName\";");
|
$this->query("DROP trigger IF EXISTS $triggerName ON \"$tableName\";");
|
||||||
}
|
}
|
||||||
@ -1364,7 +1359,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
$existing = $this->preparedQuery(
|
$existing = $this->preparedQuery(
|
||||||
"SELECT spcname, spclocation FROM pg_tablespace WHERE spcname = ?;",
|
"SELECT spcname, spclocation FROM pg_tablespace WHERE spcname = ?;",
|
||||||
array($name)
|
array($name)
|
||||||
)->first();
|
)->record();
|
||||||
|
|
||||||
//NOTE: this location must be empty for this to work
|
//NOTE: this location must be empty for this to work
|
||||||
//We can't seem to change the location of the tablespace through any ALTER commands :(
|
//We can't seem to change the location of the tablespace through any ALTER commands :(
|
||||||
@ -1489,7 +1484,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
$result = $this->preparedQuery(
|
$result = $this->preparedQuery(
|
||||||
"SELECT lanname FROM pg_language WHERE lanname = ?;",
|
"SELECT lanname FROM pg_language WHERE lanname = ?;",
|
||||||
array($language)
|
array($language)
|
||||||
)->first();
|
)->value();
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$this->query("CREATE LANGUAGE $language;");
|
$this->query("CREATE LANGUAGE $language;");
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"silverstripe/framework": "^4",
|
"silverstripe/framework": "^5",
|
||||||
"silverstripe/vendor-plugin": "^1.0"
|
"silverstripe/vendor-plugin": "^2",
|
||||||
|
"ext-pgsql": "*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9.5",
|
"phpunit/phpunit": "^9.5",
|
||||||
|
@ -1,17 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
||||||
|
<testsuites>
|
||||||
<testsuite name="Default">
|
<testsuite name="postgresql">
|
||||||
<directory>tests</directory>
|
<directory>tests</directory>
|
||||||
|
<directory>vendor/silverstripe/framework/tests/php</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
<filter>
|
|
||||||
<whitelist addUncoveredFilesFromWhitelist="true">
|
|
||||||
<directory suffix=".php">.</directory>
|
|
||||||
<exclude>
|
|
||||||
<directory suffix=".php">tests/</directory>
|
|
||||||
</exclude>
|
|
||||||
</whitelist>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
Loading…
Reference in New Issue
Block a user