MNT Expand Composer requirements to support PHP 8, Update Behat config to support Symfony 4
1 |
<?php
|
|
2 |
|
|
3 |
// Register database adapters available in SilverStripe
|
|
4 |
use SilverStripe\Dev\Install\DatabaseAdapterRegistry; |
|
5 |
use SilverStripe\Dev\Install\MySQLDatabaseConfigurationHelper; |
|
6 |
|
|
7 |
// Register MySQLi as a database adapter (listed as second option in Dev/Install/config-form.html)
|
|
8 |
DatabaseAdapterRegistry::register( |
|
9 |
[
|
|
10 |
/** @skipUpgrade */
|
|
11 |
'class' => 'MySQLDatabase', |
|
12 |
'module' => 'framework', |
|
13 |
'title' => 'MySQL 5.0+ (using MySQLi)', |
|
14 |
'helperPath' => __DIR__ . '/src/Dev/Install/MySQLDatabaseConfigurationHelper.php', |
|
15 |
'helperClass' => MySQLDatabaseConfigurationHelper::class, |
|
16 |
'supported' => class_exists('MySQLi'), |
|
17 |
'missingExtensionText' => |
|
18 |
'The <a href="http://www.php.net/manual/en/book.mysqli.php">MySQLi</a>
|
|
19 |
PHP extension is not available. Please install or enable it and refresh this page.'
|
|
20 |
]
|
|
21 |
);
|
|
22 |
|
|
23 |
// Register MySQL PDO as a database adapter (listed as first option in Dev/Install/config-form.html)
|
|
24 |
DatabaseAdapterRegistry::register( |
|
25 |
[
|
|
26 |
/** @skipUpgrade */
|
|
27 |
'class' => 'MySQLPDODatabase', |
|
28 |
'module' => 'framework', |
|
29 |
'title' => 'MySQL 5.0+ (using PDO) - <b>not recommended</b>', |
|
30 |
'helperPath' => __DIR__ . '/src/Dev/Install/MySQLDatabaseConfigurationHelper.php', |
|
31 |
'helperClass' => MySQLDatabaseConfigurationHelper::class, |
|
32 |
'supported' => (class_exists('PDO') && in_array('mysql', PDO::getAvailableDrivers())), |
|
33 |
'missingExtensionText' => |
|
34 |
'Either the <a href="http://www.php.net/manual/en/book.pdo.php">PDO Extension</a> or
|
|
35 |
the <a href="http://www.php.net/manual/en/ref.pdo-mysql.php">MySQL PDO Driver</a>
|
|
36 |
are unavailable. Please install or enable these and refresh this page.'
|
|
37 |
]
|
|
38 |
);
|
Read our documentation on viewing source code .