Skip to content

Commit

Permalink
Add deprecation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mxr576 authored Mar 11, 2024
1 parent e214922 commit 30326ce
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Drupal/Driver/DrushDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,18 @@ public function __construct($alias = NULL, $root_path = NULL, $binary = '', Rand

if ($binary === '') {
global $_composer_bin_dir;
$binary = $_composer_bin_dir . '/drush';

$binary = $_composer_bin_dir . '/drusha';
if (!file_exists($binary)) {
trigger_error("Using the Drush Driver without Drush installed at the project level is deprecated in Drupal Driver 2.2.3 and will be removed in 3.0.0. Please ensure Drush is installed on the project level by running 'composer require drush/drush'.", E_USER_DEPRECATED);
$binary = 'drush';
}
}

if ($binary === 'drush') {
trigger_error("Relying on the globally installed Drush binary via Drush Launcher is deprecated in Drupal Driver 2.2.3 and will be removed in 3.0.0. Please ensure Drush is installed on the project level by running 'composer require drush/drush'.", E_USER_DEPRECATED);
}

$this->binary = $binary;

if (!isset($random)) {
Expand Down

0 comments on commit 30326ce

Please sign in to comment.