Skip to content

Commit c8106c3

Browse files
markometcalfecodyfinegan
authored andcommitted
fix: Prevent Xdebug from triggering when running composer
1 parent 6e5ba46 commit c8106c3

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎php/includes/config-after.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,5 +305,6 @@
305305

306306
// Tell Totara where composer is
307307
if (!defined('TOTARA_COMPOSER')) {
308-
define('TOTARA_COMPOSER', '/usr/bin/composer');
308+
// Disable xdebug when running composer so breakpoints don't interfere with composer operations
309+
define('TOTARA_COMPOSER', 'XDEBUG_MODE=off /usr/bin/composer');
309310
}

‎shell/util-aliases.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,6 @@ totara_version() {
101101
php -n -r "$php_code echo \$version;"
102102
fi
103103
}
104+
105+
# Run composer but disable xdebug for the duration of the command
106+
alias composer='XDEBUG_MODE=off composer'

0 commit comments

Comments
 (0)