-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable xdebug by default to improve performance (#6119)
- Loading branch information
Showing
10 changed files
with
66 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,34 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
#!/usr/bin/env sh | ||
|
||
require __DIR__ . '/drush.php'; | ||
if [ -z "$COMPOSER_RUNTIME_BIN_DIR" ]; then | ||
# This branch is for the development of Drush itself. | ||
# @see https://stackoverflow.com/questions/4774054 | ||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
DRUSH_PHP="$SCRIPTPATH/drush.php" | ||
else | ||
DRUSH_PHP="$COMPOSER_RUNTIME_BIN_DIR/drush.php" | ||
fi | ||
|
||
parse_commandline() | ||
{ | ||
while test $# -gt 0 | ||
do | ||
_key="$1" | ||
case "$_key" in | ||
--xdebug) | ||
DRUSH_ALLOW_XDEBUG=1 | ||
return | ||
;; | ||
esac | ||
shift | ||
done | ||
} | ||
|
||
parse_commandline "$@" | ||
|
||
if [ "$DRUSH_ALLOW_XDEBUG" != 1 ] | ||
then | ||
export XDEBUG_MODE=off | ||
fi | ||
|
||
"$DRUSH_PHP" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use Drush\Drush; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,14 +53,14 @@ public function testSimulatedSqlSync() | |
$this->drush(SqlSyncCommands::SYNC, ['@synctest.remote', '@synctest.local'], $options, '@synctest.local'); | ||
$output = $this->getSimplifiedErrorOutput(); | ||
$this->assertStringContainsString("[notice] Simulating: ssh -o PasswordAuthentication=whatever [email protected] '/path/to/drush sql:dump --no-interaction --strict=0 --gzip --result-file=auto --format=json --uri=remote", $output); | ||
$this->assertStringContainsString("[notice] Simulating: __DIR__/drush core:rsync @synctest.remote:/simulated/path/to/dump.tgz @synctest.local:__SANDBOX__/tmp/dump.tgz --yes --uri=local -- --remove-source-files", $output); | ||
$this->assertStringContainsString("[notice] Simulating: __DIR__/drush sql:query --no-interaction --strict=0 --file=__SANDBOX__/tmp/dump.tgz --file-delete --uri=local", $output); | ||
$this->assertStringContainsString("[notice] Simulating: __DIR__/drush.php core:rsync @synctest.remote:/simulated/path/to/dump.tgz @synctest.local:__SANDBOX__/tmp/dump.tgz --yes --uri=local -- --remove-source-files", $output); | ||
$this->assertStringContainsString("[notice] Simulating: __DIR__/drush.php sql:query --no-interaction --strict=0 --file=__SANDBOX__/tmp/dump.tgz --file-delete --uri=local", $output); | ||
|
||
// Test simulated simple sql:sync local-to-remote | ||
$this->drush(SqlSyncCommands::SYNC, ['@synctest.local', '@synctest.remote'], $options, '@synctest.local'); | ||
$output = $this->getSimplifiedErrorOutput(); | ||
$this->assertStringContainsString("[notice] Simulating: __DIR__/drush sql:dump --no-interaction --strict=0 --gzip --result-file=auto --format=json --uri=local", $output); | ||
$this->assertStringContainsString("[notice] Simulating: __DIR__/drush core:rsync @synctest.local:/simulated/path/to/dump.tgz @synctest.remote:/tmp/dump.tgz --yes --uri=local -- --remove-source-files", $output); | ||
$this->assertStringContainsString("[notice] Simulating: __DIR__/drush.php sql:dump --no-interaction --strict=0 --gzip --result-file=auto --format=json --uri=local", $output); | ||
$this->assertStringContainsString("[notice] Simulating: __DIR__/drush.php core:rsync @synctest.local:/simulated/path/to/dump.tgz @synctest.remote:/tmp/dump.tgz --yes --uri=local -- --remove-source-files", $output); | ||
$this->assertStringContainsString("[notice] Simulating: ssh -o PasswordAuthentication=whatever [email protected] '/path/to/drush sql:query --no-interaction --strict=0 --file=/tmp/dump.tgz --file-delete --uri=remote'", $output); | ||
|
||
// Test simulated remote invoke with a remote runner. | ||
|