<?php

namespace Nwidart\Modules\Process;

class Updater extends Runner
{
    /**
     * Update the dependencies for the specified module by given the module name.
     *
     * @param string $module
     */
    public function update($module)
    {
        $module = $this->module->findOrFail($module);

        $packages = $module->getComposerAttr('require', []);

        chdir(base_path());

        foreach ($packages as $name => $version) {
            $package = "\"{$name}:{$version}\"";

            $this->run("composer require {$package}");
        }
    }
}

<?php

namespace Nwidart\Modules\Process;

class Updater extends Runner
{
    /**
     * Update the dependencies for the specified module by given the module name.
     *
     * @param string $module
     */
    public function update($module)
    {
        $module = $this->module->findOrFail($module);

        $packages = $module->getComposerAttr('require', []);

        chdir(base_path());

        foreach ($packages as $name => $version) {
            $package = "\"{$name}:{$version}\"";

            $this->run("composer require {$package}");
        }

        $devPackages = $module->getComposerAttr('require-dev', []);
        foreach ($devPackages as $name => $version) {
            $package = "\"{$name}:{$version}\"";
            $this->run("composer require --dev {$package}");
        }
    }
}

Allow ability to add require-dev packages from module to the main composer.json file
Allow ability to add require-dev packages from module to the main composer.json file
