Initial Drupal 11 with DDEV setup

This commit is contained in:
gluebox
2025-10-08 11:39:17 -04:00
commit 89ef74b305
25344 changed files with 2599172 additions and 0 deletions

View File

@ -0,0 +1,17 @@
<?php
namespace Drupal\Core\Database\Driver\CoreFake;
use Drupal\Driver\Database\fake\Connection as BaseConnection;
/**
* A connection for testing database drivers.
*/
class Connection extends BaseConnection {
/**
* {@inheritdoc}
*/
public $driver = 'CoreFake';
}

View File

@ -0,0 +1,19 @@
<?php
namespace Drupal\Core\Database\Driver\CoreFake\Install;
use Drupal\Core\Database\Install\Tasks as InstallTasks;
/**
* The database installer structure for the fake database driver.
*/
class Tasks extends InstallTasks {
/**
* {@inheritdoc}
*/
public function name() {
return 'CoreFake';
}
}

View File

@ -0,0 +1,10 @@
<?php
namespace Drupal\Driver\Database\CoreFake;
use Drupal\Core\Database\Driver\CoreFake\Connection as CoreFakeConnection;
/**
* A test implementation of \Drupal\Core\Database\Connection.
*/
class Connection extends CoreFakeConnection {}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\Driver\Database\CoreFake\Install;
use Drupal\Core\Database\Driver\CoreFake\Install\Tasks as BaseInstallTasks;
/**
* The database installer structure for a custom database driver.
*/
class Tasks extends BaseInstallTasks {
}

View File

@ -0,0 +1,159 @@
<?php
namespace Drupal\Driver\Database\fake;
use Drupal\Core\Database\Connection as CoreConnection;
use Drupal\Core\Database\ExceptionHandler;
use Drupal\Core\Database\Query\Condition;
use Drupal\Core\Database\Query\Delete;
use Drupal\Core\Database\Query\Insert;
use Drupal\Core\Database\Query\Merge;
use Drupal\Core\Database\Query\Select;
use Drupal\Core\Database\Query\Truncate;
use Drupal\Core\Database\Query\Update;
use Drupal\Core\Database\Query\Upsert;
use Drupal\Core\Database\StatementWrapper;
use Drupal\Core\Database\Transaction;
/**
* A fake Connection class for testing purposes.
*/
class Connection extends CoreConnection {
/**
* {@inheritdoc}
*/
protected $statementClass = NULL;
/**
* {@inheritdoc}
*/
protected $statementWrapperClass = StatementWrapper::class;
/**
* {@inheritdoc}
*/
protected $identifierQuotes = ['"', '"'];
/**
* Public property so we can test driver loading mechanism.
*
* @var string
* @see driver().
*/
public $driver = 'fake';
/**
* {@inheritdoc}
*/
public function queryRange($query, $from, $count, array $args = [], array $options = []) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function driver() {
return $this->driver;
}
/**
* {@inheritdoc}
*/
public function databaseType() {
return 'fake';
}
/**
* {@inheritdoc}
*/
public function createDatabase($database) {}
/**
* {@inheritdoc}
*/
public function mapConditionOperator($operator) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function exceptionHandler() {
return new ExceptionHandler();
}
/**
* {@inheritdoc}
*/
public function select($table, $alias = NULL, array $options = []) {
return new Select($this, $table, $alias, $options);
}
/**
* {@inheritdoc}
*/
public function insert($table, array $options = []) {
return new Insert($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function merge($table, array $options = []) {
return new Merge($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function upsert($table, array $options = []) {
return new Upsert($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function update($table, array $options = []) {
return new Update($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function delete($table, array $options = []) {
return new Delete($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function truncate($table, array $options = []) {
return new Truncate($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function schema() {
if (empty($this->schema)) {
$this->schema = new Schema($this);
}
return $this->schema;
}
/**
* {@inheritdoc}
*/
public function condition($conjunction) {
return new Condition($conjunction, FALSE);
}
/**
* {@inheritdoc}
*/
public function startTransaction($name = '') {
return new Transaction($this, $name);
}
}

View File

@ -0,0 +1,19 @@
<?php
namespace Drupal\Driver\Database\fake\Install;
use Drupal\Core\Database\Install\Tasks as InstallTasks;
/**
* A task for testing database drivers.
*/
class Tasks extends InstallTasks {
/**
* {@inheritdoc}
*/
public function name() {
return 'fake';
}
}

View File

@ -0,0 +1,17 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFake;
use Drupal\Driver\Database\fake\Connection as BaseConnection;
/**
* CoreFake implementation of \Drupal\Core\Database\Connection.
*/
class Connection extends BaseConnection {
/**
* {@inheritdoc}
*/
public $driver = 'CoreFake';
}

View File

@ -0,0 +1,19 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFake\Install;
use Drupal\Core\Database\Install\Tasks as InstallTasks;
/**
* Specifies installation tasks for CoreFake.
*/
class Tasks extends InstallTasks {
/**
* {@inheritdoc}
*/
public function name() {
return 'CoreFake';
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\Condition as QueryCondition;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Condition.
*/
class Condition extends QueryCondition {
}

View File

@ -0,0 +1,97 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Driver\Database\fake\Connection as BaseConnection;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Connection.
*/
class Connection extends BaseConnection {
/**
* {@inheritdoc}
*/
public $driver = 'CoreFakeWithAllCustomClasses';
/**
* {@inheritdoc}
*/
public function exceptionHandler() {
return new ExceptionHandler();
}
/**
* {@inheritdoc}
*/
public function select($table, $alias = NULL, array $options = []) {
return new Select($this, $table, $alias, $options);
}
/**
* {@inheritdoc}
*/
public function insert($table, array $options = []) {
return new Insert($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function merge($table, array $options = []) {
return new Merge($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function upsert($table, array $options = []) {
return new Upsert($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function update($table, array $options = []) {
return new Update($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function delete($table, array $options = []) {
return new Delete($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function truncate($table, array $options = []) {
return new Truncate($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function schema() {
if (empty($this->schema)) {
$this->schema = new Schema($this);
}
return $this->schema;
}
/**
* {@inheritdoc}
*/
public function condition($conjunction) {
return new Condition($conjunction, FALSE);
}
/**
* {@inheritdoc}
*/
public function startTransaction($name = '') {
return new Transaction($this, $name);
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\Delete as QueryDelete;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Delete.
*/
class Delete extends QueryDelete {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\ExceptionHandler as BaseExceptionHandler;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\ExceptionHandler.
*/
class ExceptionHandler extends BaseExceptionHandler {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\Insert as QueryInsert;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Insert.
*/
class Insert extends QueryInsert {
}

View File

@ -0,0 +1,19 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Install;
use Drupal\Core\Database\Install\Tasks as InstallTasks;
/**
* Specifies installation tasks for CoreFakeWithAllCustomClasses.
*/
class Tasks extends InstallTasks {
/**
* {@inheritdoc}
*/
public function name() {
return 'CoreFakeWithAllCustomClasses';
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\Merge as QueryMerge;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Merge.
*/
class Merge extends QueryMerge {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\PagerSelectExtender as QueryPagerSelectExtender;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Query\PagerSelectExtender.
*/
class PagerSelectExtender extends QueryPagerSelectExtender {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Tests\Core\Database\Stub\StubSchema;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Schema.
*/
class Schema extends StubSchema {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\search\SearchQuery as CoreSearchQuery;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\search\SearchQuery.
*/
class SearchQuery extends CoreSearchQuery {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\Select as QuerySelect;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Select.
*/
class Select extends QuerySelect {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\TableSortExtender as QueryTableSortExtender;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Query\TableSortExtender.
*/
class TableSortExtender extends QueryTableSortExtender {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Transaction as DatabaseTransaction;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Transaction.
*/
class Transaction extends DatabaseTransaction {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\Truncate as QueryTruncate;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Truncate.
*/
class Truncate extends QueryTruncate {
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\Update as QueryUpdate;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Update.
*/
class Update extends QueryUpdate {
}

View File

@ -0,0 +1,24 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\Core\Database\Query\Upsert as QueryUpsert;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Upsert.
*/
class Upsert extends QueryUpsert {
/**
* {@inheritdoc}
*/
public function execute() {}
/**
* {@inheritdoc}
*/
public function __toString() {
throw new \BadMethodCallException('Upsert not implemented');
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses;
use Drupal\search\ViewsSearchQuery as CoreViewsSearchQuery;
/**
* CoreFakeWithAllCustomClasses implementation of \Drupal\search\ViewsSearchQuery.
*/
class ViewsSearchQuery extends CoreViewsSearchQuery {
}