These are chat archives for composer/composer

21st
Mar 2017
Angel Guevara
@Faryshta
Mar 21 2017 15:59

can i execute composer commands from a php listener method?

    public static function init(Event $event)
    {
        $composer = $event->getComposer();
        if (version_compare($composer::VERSION, '1.3.0', 'le')) {
            $composer->runCommand('self-update')
        }
    }

for example

Owen Melbourne
@OwenMelbz
Mar 21 2017 17:59
If composer bin is in the vendor folder most likely
Angel Guevara
@Faryshta
Mar 21 2017 21:24
@OwenMelbz but how?
Owen Melbourne
@OwenMelbz
Mar 21 2017 21:42
By asking google and clicking the results 😂 which would lead you to something like http://stackoverflow.com/questions/17219436/run-composer-with-a-php-script-in-browser