Skip to content
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
23 changes: 23 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,29 @@ the missing behaviour themselves. Test the capability with
`instanceof ContentCapabilityInterface` (or the relevant capability interface)
before calling.

### DrushDriver no longer detects legacy Drush

`DrushDriver` used to probe `drush version` during `bootstrap()` and cache the
answer in a `protected static bool $isLegacyDrush` to pick between Drush 8 and
Drush 9+ behaviour. Drupal `^10 || ^11` requires Drush 11 or newer, so the
Drush 8 branches were unreachable. Both the probe and the flag are gone:

- `DrushDriver::isLegacyDrush()` (protected) - removed.
- `DrushDriver::$isLegacyDrush` (protected static) - removed.

The behaviour they gated is now unconditional:

- `drushResult()` always passes `--no-ansi`. The Drush 8 `--nocolor` spelling
is never emitted.
- `cacheClear()` always takes the `cache:rebuild` path. A `'drush'` type still
short-circuits to `cache-clear drush`.
- `bootstrap()` no longer shells out to Drush; it only flips the bootstrapped
flag.

Subclasses that overrode `isLegacyDrush()` or read `static::$isLegacyDrush`
must drop those overrides. Sites that still run Drush 8 are on Drupal 9 or
earlier and belong on the 2.x line.

### CoreInterface expanded

`Drupal\Driver\Core\CoreInterface` now extends every capability interface in
Expand Down
14 changes: 1 addition & 13 deletions tests/Drupal/Tests/Driver/Unit/DrushDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,10 @@ public static function dataProviderParseUserId(): \Iterator {
}

/**
* Testable subclass that stubs the 'drush()' method.
* Testable subclass that exposes protected helpers.
*/
class TestDrushDriver extends DrushDriver {

/**
* The output to return from 'drush()'.
*/
public string $drushOutput = '';

/**
* {@inheritdoc}
*/
public function drush($command, array $arguments = [], array $options = []): string {
return $this->drushOutput;
}

/**
* Exposes 'parseUserId()' for testing.
*/
Expand Down
Loading