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,97 @@
<?php
namespace Robo\Task\Bower;
use Robo\Task\BaseTask;
use Robo\Exception\TaskException;
use Robo\Common\ExecOneCommand;
abstract class Base extends BaseTask
{
use ExecOneCommand;
/**
* @var array
*/
protected $opts = [];
/**
* @var string
*/
protected $action = '';
/**
* @var string
*/
protected $command = '';
/**
* adds `allow-root` option to bower
*
* @return $this
*/
public function allowRoot()
{
$this->option('allow-root');
return $this;
}
/**
* adds `force-latest` option to bower
*
* @return $this
*/
public function forceLatest()
{
$this->option('force-latest');
return $this;
}
/**
* adds `production` option to bower
*
* @return $this
*/
public function noDev()
{
$this->option('production');
return $this;
}
/**
* adds `offline` option to bower
*
* @return $this
*/
public function offline()
{
$this->option('offline');
return $this;
}
/**
* Base constructor.
*
* @param null|string $pathToBower
*
* @throws \Robo\Exception\TaskException
*/
public function __construct($pathToBower = null)
{
$this->command = $pathToBower;
if (!$this->command) {
$this->command = $this->findExecutable('bower');
}
if (!$this->command) {
throw new TaskException(__CLASS__, "Bower executable not found.");
}
}
/**
* @return string
*/
public function getCommand()
{
return "{$this->command} {$this->action}{$this->arguments}";
}
}

View File

@ -0,0 +1,37 @@
<?php
namespace Robo\Task\Bower;
use Robo\Contract\CommandInterface;
/**
* Bower Install
*
* ``` php
* <?php
* // simple execution
* $this->taskBowerInstall()->run();
*
* // prefer dist with custom path
* $this->taskBowerInstall('path/to/my/bower')
* ->noDev()
* ->run();
* ?>
* ```
*/
class Install extends Base implements CommandInterface
{
/**
* {@inheritdoc}
*/
protected $action = 'install';
/**
* {@inheritdoc}
*/
public function run()
{
$this->printTaskInfo('Install Bower packages: {arguments}', ['arguments' => $this->arguments]);
return $this->executeCommand($this->getCommand());
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace Robo\Task\Bower;
trait Tasks
{
/**
* @param null|string $pathToBower
*
* @return \Robo\Task\Bower\Install|\Robo\Collection\CollectionBuilder
*/
protected function taskBowerInstall($pathToBower = null)
{
return $this->task(Install::class, $pathToBower);
}
/**
* @param null|string $pathToBower
*
* @return \Robo\Task\Bower\Update|\Robo\Collection\CollectionBuilder
*/
protected function taskBowerUpdate($pathToBower = null)
{
return $this->task(Update::class, $pathToBower);
}
}

View File

@ -0,0 +1,35 @@
<?php
namespace Robo\Task\Bower;
/**
* Bower Update
*
* ``` php
* <?php
* // simple execution
* $this->taskBowerUpdate->run();
*
* // prefer dist with custom path
* $this->taskBowerUpdate('path/to/my/bower')
* ->noDev()
* ->run();
* ?>
* ```
*/
class Update extends Base
{
/**
* {@inheritdoc}
*/
protected $action = 'update';
/**
* {@inheritdoc}
*/
public function run()
{
$this->printTaskInfo('Update Bower packages: {arguments}', ['arguments' => $this->arguments]);
return $this->executeCommand($this->getCommand());
}
}