Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop hiding generator command from DCG, and misc Drupal 11 fixes #5896

Merged
merged 6 commits into from
Mar 11, 2024
Merged
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
8 changes: 4 additions & 4 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: drush
type: php
docroot: sut
php_version: "8.1"
php_version: "8.3"
webserver_type: nginx-fpm
router_http_port: "87"
router_https_port: "444"
Expand All @@ -21,8 +21,8 @@ webimage_extra_packages:
# type: postgres
# version: 14
web_environment:
- UNISH_DB_URL=mysql://root:root@db
# - "UNISH_DB_URL=sqlite://:memory:"
# - UNISH_DB_URL=pgsql://db:db@db:5432
- UNISH_DB_URL=mysql://root:root@db/unish_dev?module=mysql
# - "UNISH_DB_URL=sqlite://:memory:?module=sqlite"
# - UNISH_DB_URL=pgsql://db:db@db:5432?module=pgsql
- DRUSH_OPTIONS_URI=$DDEV_PRIMARY_URL
- EDITOR=nano
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"mk:docs": "./drush --uri=dev -v mk:docs",
"rector": "rector process",
"sut": "./drush --uri=dev",
"sut:si": "./drush --uri=dev site:install ${INSTALL_PROFILE:-testing} --sites-subdir=dev --db-url=${UNISH_DB_URL:-mysql://root:password@mariadb}/unish_dev -v",
"sut:si": "./drush --uri=dev site:install ${INSTALL_PROFILE:-testing} --sites-subdir=dev --db-url=${UNISH_DB_URL:-mysql://root:password@mariadb/unish_dev?module=mysql} -v",
"phpunit": "php -d sendmail_path='true' vendor/bin/phpunit --colors=always --testdox --configuration tests",
"unit": "composer phpunit -- --testsuite unit",
"integration": "composer phpunit -- --testsuite integration",
Expand Down
3 changes: 3 additions & 0 deletions src/Commands/core/MigrateRunnerCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Drupal\Component\Plugin\Exception\PluginException;
use Drupal\Core\Datetime\DateFormatterInterface;
use Drupal\Core\KeyValueStore\KeyValueFactoryInterface;
use Drupal\Core\KeyValueStore\KeyValueStoreInterface;
use Drupal\migrate\Exception\RequirementsException;
use Drupal\migrate\MigrateMessageInterface;
use Drupal\migrate\Plugin\MigrateIdMapInterface;
Expand All @@ -34,6 +35,8 @@ class MigrateRunnerCommands extends DrushCommands
use AutowireTrait;

protected ?MigrationPluginManagerInterface $migrationPluginManager = null;
protected KeyValueStoreInterface $keyValue;
private MigrateMessage $migrateMessage;

public function __construct(
protected DateFormatterInterface $dateFormatter,
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/generate/ApplicationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function create(): Application
$generators = $this->discover();
$application->addCommands($generators);
// Hide default Symfony console commands.
foreach (['help', 'list', 'completion', '_complete', 'generator'] as $name) {
foreach (['help', 'list', 'completion', '_complete'] as $name) {
$application->get($name)->setHidden(true);
}
return $application;
Expand Down
4 changes: 2 additions & 2 deletions src/Sql/SqlBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

namespace Drush\Sql;

use Consolidation\Config\Util\Interpolator;
use Consolidation\SiteProcess\Util\Escape;
use Drupal\Core\Database\Database;
use Drush\Boot\DrupalBootLevels;
use Drush\Config\ConfigAwareTrait;
use Drush\Drush;
use Drush\Utils\FsUtils;
use Drush\Config\ConfigAwareTrait;
use Robo\Contract\ConfigAwareInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Filesystem\Path;
use Symfony\Component\Process\Process;
use Consolidation\Config\Util\Interpolator;

/**
* The base implementation for Drush database connections.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Drush empty theme
description: 'Drush empty theme'
core: 8.x
core_version_requirement: ^8 || ^9 || ^10
core_version_requirement: ^8 || ^9 || ^10 || ^11
type: theme
base theme: stark
4 changes: 4 additions & 0 deletions tests/integration/ImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public function testImage()
$styles_dir = $this->webroot() . '/sites/default/files/styles/';
$thumbnail = $styles_dir . 'thumbnail/public/' . $logo;
$medium = $styles_dir . 'medium/public/' . $logo;
if ($this->isDrupalGreaterThanOrEqualTo('10.3.0')) {
$thumbnail .= '.webp';
$medium .= '.webp';
}

// Remove stray files left over from previous runs
@unlink($thumbnail);
Expand Down