Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.7] Pass configuration key parameter to updatePackageArray in Preset #25457

Merged
merged 1 commit into from
Sep 5, 2018

Conversation

nulpatrol
Copy link
Contributor

@nulpatrol nulpatrol commented Sep 5, 2018

Small improvement of #24189.
Now we can update "dependency" block or "devDependency" block in package.json.
But we have no way to updating both blocks at the same time, because updatePackageArray method just returns array of packages without specifying is this dev-dependency or dependency.

After small change we can write something like in our preset code:

protected static function updatePackageArray(array $packages, $configurationKey)
{
    return $configurationKey === 'dependencies' : self::getDependencies($packages) ? self::getDevDependencies($packages);
}

@taylorotwell taylorotwell merged commit 8021279 into laravel:5.7 Sep 5, 2018
@GrahamCampbell GrahamCampbell changed the title Pass configuration key parameter to updatePackageArray in Preset [5.7] Pass configuration key parameter to updatePackageArray in Preset Sep 6, 2018
@nulpatrol nulpatrol deleted the 5.7 branch September 19, 2018 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants