Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to Set Composer Environment Variables

I don't want to disable Xdebug, I don't care that it's slower, so I see there is an environment variable COMPOSER_DISABLE_XDEBUG_WARN and the docs mention setting it in the config.

So, I opened my global /Users/username/.composer/config.json and add:

{
    "config": {
        "COMPOSER_DISABLE_XDEBUG_WARN": true
    }
}

No change.

Where or how do I set this environment variable to get rid of this damn message?

like image 801
Vince Kronlein Avatar asked Dec 29 '15 23:12

Vince Kronlein


People also ask

How do you set environment variables?

On the Windows taskbar, right-click the Windows icon and select System. In the Settings window, under Related Settings, click Advanced system settings. On the Advanced tab, click Environment Variables. Click New to create a new environment variable.


1 Answers

The PHP CLI inherits the environment variables from your shell. You can add the following line to your .bash_profile (or whatever you use for your shell).

export COMPOSER_DISABLE_XDEBUG_WARN=1

Make sure to close the terminal, and reopen it to load the new variable.

Source: https://stackoverflow.com/a/18098263/58795

like image 186
Mike McLin Avatar answered Oct 06 '22 00:10

Mike McLin